--- ByteOrder.cpp	Thu Oct 16 19:17:37 2003
+++ ByteOrder.cpp.mod	Wed Oct 15 21:11:34 2003
@@ -50,7 +50,10 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-07-27 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               2003-07-27 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Removed the [BIG|LITTLE]_ENDIAN_ARCH defines.       ## */
 /* ##               - Cleanup the formatting.                             ## */
 /* ##               - Integrated the License Statement into this header.  ## */
--- GalileoApp.cpp	Thu Oct 16 19:17:39 2003
+++ GalileoApp.cpp.mod	Wed Oct 15 21:17:40 2003
@@ -8,11 +8,51 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: <none>                                                ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-04-25 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-04-25 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Updated the global debug flag (_DEBUG) handling     ## */
 /* ##                 of the source file (check for platform etc.).       ## */
 /* ##               2003-03-28 (joe@eiler.net)                            ## */
@@ -24,51 +64,6 @@
 /* ##                 communication efforts.                              ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// GalileoApp.cpp: Implementation of application-wide functionality, such as
-// start-up and shut-down code, for Iometer.
-//
-//////////////////////////////////////////////////////////////////////
-/* ######################################################################### */
 
 #include "stdafx.h"
 #include "GalileoDefs.h"
@@ -90,13 +85,14 @@
 //       will be a MFC hacker who could advice here.
 //       [1] = http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_debug_new.asp
 //
-#if defined (_WIN32) || defined (_WIN64)
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #ifdef _DEBUG
+  #define new DEBUG_NEW
+  #undef THIS_FILE
+  static char THIS_FILE[] = __FILE__;
+ #endif
 #endif
+
 
 
 /////////////////////////////////////////////////////////////////////////////
--- GalileoApp.h	Thu Oct 16 19:17:39 2003
+++ GalileoApp.h.mod	Wed Oct 15 21:19:22 2003
@@ -8,64 +8,60 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: <none>                                                ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...:                                                       ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
 /* ##               2003-03-28 (joe@eiler.net)                            ## */
 /* ##               - changes so VC++ 7 (.NET) will compile correctly.    ## */
 /* ##               2003-03-28 (joe@eiler.net)                            ## */
 /* ##               - added new header info.                              ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// GalileoApp.h: Main header file for the Iometer application.
-//
-//////////////////////////////////////////////////////////////////////
-
 #ifndef GALILEO_DEFINED
 #define GALILEO_DEFINED
 
+
 #include "GalileoDefs.h"
 #ifndef __AFXWIN_H__
 	#error include 'stdafx.h' before including this file for PCH
@@ -166,3 +162,7 @@
 
 
 #endif
+
+
+
+
--- IOCQ.h	Thu Oct 16 19:19:06 2003
+++ IOCQ.h.mod	Wed Oct 15 22:47:40 2003
@@ -1,55 +1,70 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOCQ.h: Interface for the abstract class CQ (Completion Queue), which is
-// used to manage completions.  Inherited subclasses can be blocking or
-// non-blocking, allowing the use of completion polling or waiting.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOCQ.h                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the abstract class CQ (Completion       ## */ 
+/* ##               Queue), which is used to manage completions.          ## */ 
+/* ##               Inherited subclasses can be blocking or non-blocking, ## */ 
+/* ##               allowing the use of completion polling or waiting.    ## */ 
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	CQ_DEFINED
 #define	CQ_DEFINED
 
 
-#if defined (_WIN32) || defined (_WIN64)
-#include <afxwin.h>
+
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include <afxwin.h>
 #endif
 #include "IOTransfers.h"
 #include "IOCommon.h"
@@ -61,7 +76,7 @@
 public:
 
 	virtual	ReturnVal	GetStatus( int *bytes, int *data, int delay ) = NULL;
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 	virtual BOOL		SetQueueSize(int size) { return FALSE; };
 #endif
 };
--- IOCQAIO.h	Thu Oct 16 19:19:06 2003
+++ IOCQAIO.h.mod	Wed Oct 15 22:50:19 2003
@@ -1,49 +1,63 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOCQAIO.h: Interface for the class CQAIO, which provides a Completion
-// Queue for asynchronous access to TargetDisk and TargetTCP objects.  CQAIO
-// is an implementation of the abstract class CQ.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOCQ.h                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the class CQAIO, which provides a       ## */
+/* ##               Completion Queue for asynchronous access to           ## */
+/* ##               TargetDisk and TargetTCP objects. CQAIO is an         ## */
+/* ##               implementation of the abstract class CQ.              ## */ 
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	CQAIO_DEFINED
 #define	CQAIO_DEFINED
 
@@ -69,7 +83,7 @@
 	// Attach asynchronous I/O objects with this completion queue.
 	//
 	ReturnVal	GetStatus( int *bytes, int *data, int delay );
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 	BOOL        SetQueueSize(int);
 #endif
 	HANDLE		completion_queue;
@@ -81,3 +95,7 @@
 
 
 #endif // CQAIO_DEFINED
+
+
+
+
--- IOCQVI.cpp	Thu Oct 16 19:19:06 2003
+++ IOCQVI.cpp.mod	Wed Oct 15 21:22:27 2003
@@ -1,59 +1,77 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOCQVI.cpp: Implementation of the class CQVI, which provides a Completion
-// Queue for asynchronous access to TargetVI objects.  CQVI is an 
-// implementation of the abstract class CQ.
-//
-//////////////////////////////////////////////////////////////////////
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOCQVI.cpp                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Implementation of the class CQVI, which provides a    ## */
+/* ##               Completion Queue for asynchronous access to TargetVI  ## */
+/* ##               objects. CQVI is an implementation of the abstract    ## */
+/* ##               class CQ.                                             ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 
 #include "IOCQVI.h"
 #include "NetVI.h"
 #include "IOTargetVI.h"
 
-#if defined (_WIN32) || defined (_WIN64)
-#include <iostream>
-using namespace std;
-#else /* !WIN32 || _WIN64 */
-#include <iostream.h>
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include <iostream>
+ using namespace std;
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
+ #include <iostream.h>
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
+
 
 #define CQVI_DETAILS 0 // Set to 1 for additional debug messages.
 
--- IOCQVI.h	Thu Oct 16 19:19:06 2003
+++ IOCQVI.h.mod	Wed Oct 15 21:52:03 2003
@@ -1,49 +1,63 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOCQVI.h: Interface for the class CQVI, which provides a Completion
-// Queue for asynchronous access to TargetVI objects.  CQVI is an 
-// implementation of the abstract class CQ.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOCQVI.h                                                  ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the class CQVI, which provides a        ## */
+/* ##               Completion Queue for asynchronous access to TargetVI  ## */
+/* ##               objects. CQVI is an implementation of the abstract    ## */
+/* ##               class CQ.                                             ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	CQVI_DEFINED
 #define	CQVI_DEFINED
 
--- IOCompletionQ.cpp	Thu Oct 16 19:19:08 2003
+++ IOCompletionQ.cpp.mod	Wed Oct 15 21:07:01 2003
@@ -1,54 +1,76 @@
-/*
-Intel Open Source License 
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOCompletionQ.cpp                                         ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: UNIX implementations of several key Windows NT        ## */
+/* ##               functions for asynchronous I/O (such as ReadFile(),   ## */
+/* ##               WriteFile(), and GetQueuedCompletionStatus()),        ## */
+/* ##               making it easier to change the Windows code without   ## */
+/* ##               breaking the UNIX versions.                           ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ // nop
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1998-2000 Intel Corporation
-//                          All rights reserved
-//                INTEL CORPORATION PROPRIETARY INFORMATION
-//    This software is supplied under the terms of a license agreement or
-//    nondisclosure agreement with Intel Corporation and may not be copied
-//    or disclosed except in accordance with the terms of that agreement.
-// ==========================================================================
-//
-// IOCompletionQ.cpp: UNIX implementations of several key Windows NT 
-// functions for asynchronous I/O (such as ReadFile(), WriteFile(), and 
-// GetQueuedCompletionStatus()), making it easier to change the Windows
-// code without breaking the UNIX versions.
-//
-//////////////////////////////////////////////////////////////////////
 
-#ifdef UNIX
 #include "IOCommon.h"
 #include <assert.h>
 
+
+
+
+
 BOOL SetQueueSize(HANDLE cqid, int size)
 {
 	// Allocate memory for size elements in the completion queue.
@@ -79,6 +101,10 @@
 	return(TRUE);
 }
 
+
+
+
+
 //
 // This function is the UNIX equivalent of the NT call to create a IO Completion Port.
 // The behavior is similar to the NT call wherein a Completion Queue is created and
@@ -125,6 +151,9 @@
 }
 
 
+
+
+
 //
 // This is the UNIX equivalent of the NT call CreateEvent() which creates an Event Queue.
 // It is similar to a Completion Queue and works in the same way. The only difference is
@@ -156,6 +185,9 @@
 }
 
 
+
+
+
 //
 // Again, another NT-like call.
 //
@@ -266,7 +298,7 @@
 		*bytes_transferred = 0;
 		*completion_key = 0;
 		if ( (errno == EAGAIN) || (errno == EINVAL) ) {
-#ifdef LINUX
+#if defined(IOMTR_OS_LINUX)
 			assert(errno == EAGAIN);
 #endif
 			SetLastError(WAIT_TIMEOUT);
@@ -309,6 +341,9 @@
 }
 
 
+
+
+
 //
 // This call is very similar to GetQueuedCompletionStatus().
 //
@@ -424,6 +459,8 @@
 
 
 
+
+
 //
 // ReadFile() reads "bytes_to_read" bytes from the file_handle into the buffer.
 // The call uses asynch I/O routine aio_read().
@@ -540,6 +577,8 @@
 
 
 
+
+
 //
 // WriteFile() writes "bytes_to_write" bytes from the buffer into the file pointed to by
 // the file handle.
@@ -654,6 +693,9 @@
 }
 
 
+
+
+
 //
 // CloseHandle() has a slightly different interface from the NT call. It takes an
 // additional input parameter to determine the object type. The object can be either
@@ -712,7 +754,7 @@
 			if (!cqid->aiocb_list[i])
 				continue;
 
-#ifdef LINUX
+#if defined(IOMTR_OS_LINUX)
 			/*
 			 * In Linux, you crash (!) if the aiocpb isn't in your queue. :-(
 			 * This code seems to occasionally do this...so I just cancel all
@@ -752,6 +794,8 @@
 
 
 
+
+
 //
 // Here are some simple self-explanatory routines.
 //
@@ -808,6 +852,9 @@
 }
 
 
+
+
+
 unsigned int SetErrorMode(unsigned int umode)
 {
 	// This function does nothing. Just a dummy equivalent of NT calls.
@@ -815,4 +862,14 @@
 	return(0);
 }
 
-#endif	// UNIX
+
+
+
+
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
+#endif
+
+
+
+
--- IOManager.cpp	Thu Oct 16 19:22:28 2003
+++ IOManager.cpp.mod	Wed Oct 15 20:10:01 2003
@@ -49,7 +49,10 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-07-27 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-08-05 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Massive cleanup of this file (grouping the          ## */
+/* ##                 different blocks together).                         ## */
+/* ##               2003-07-27 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Replaced the [BIG|LITTLE]_ENDIAN_ARCH defines by    ## */
 /* ##                 IsBigEndian() function calls.                       ## */
 /* ##               - Integrated the License Statement into this header.  ## */
@@ -70,14 +73,18 @@
 /* ######################################################################### */
 
 
+
 #include "IOCommon.h"
 #include "IOManager.h"
-#if defined (_WIN32) || defined (_WIN64)
-#include "winsock2.h"
-#else // UNIX
-#include <netdb.h>
-#include <arpa/inet.h>
-#include <sys/types.h>
+
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include "winsock2.h"
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
+ #include <netdb.h>
+ #include <arpa/inet.h>
+ #include <sys/types.h> 
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 
 #include "IOPortTCP.h"
@@ -126,12 +133,16 @@
 
 	prt->Close();
 	delete prt;
-#if defined (_WIN32) || defined (_WIN64)
+	
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	VirtualFree( data, 0, MEM_RELEASE );
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 	free(data);
 	free(swap_devices);
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
+
 	for ( g = 0; g < grunt_count; g++ )
 		delete grunts[g];
 }
@@ -190,7 +201,7 @@
 	}
 	else
 	{
-#ifdef UNIX
+#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 		// This will not work correctly if hostname length > MAX_NETWORK_NAME
 		if (gethostname(manager_name, name_size) < 0)
 		{
@@ -198,8 +209,10 @@
 			exit(1);
 		}
 		name_size = strlen(data_msg.data.manager_info.names[0]);
-#else /* WIN_NT */
+#elif defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		GetComputerName( manager_name, (LPDWORD)&name_size );
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 		strcpy(data_msg.data.manager_info.names[0], manager_name);
 	}
@@ -208,11 +221,15 @@
 	data_msg.data.manager_info.processor_speed = perf_data[WHOLE_TEST_PERF].processor_speed;
 	data_msg.data.manager_info.processors      = perf_data[WHOLE_TEST_PERF].processor_count;
 
-#ifdef __sparc
+#if defined(IOMTR_CPU_SPARC)
+ #if defined(IOMTR_OS_SOLARIS)
 	// Calculate processor_speed_to_nsecs for use in rdtsc.c
 	// Note that this works only for MHz CPUs. For GHz CPUs the divisor will change.
-	processor_speed_to_nsecs = (double)perf_data[WHOLE_TEST_PERF].processor_speed / 1000000000;
-#endif // __sparc
+	processor_speed_to_nsecs = (double)perf_data[WHOLE_TEST_PERF].processor_speed / 1000000000; 
+ #else
+  #warning ===> WARNING: You have to do some coding here to get the port done!
+ #endif
+#endif
 
 	// Sending login request message.
 	cout << "Sending login request..." << endl;
@@ -279,7 +296,8 @@
 }
 
 
-#ifndef UNIX
+
+#if defined(IOMTR_OSFAMILY_WINDOWS)
 //
 // Checking for all accessible drives.  Storing them, and returning the number
 // of disks found.  Drives are reported in order so that Iometer does not
@@ -354,7 +372,9 @@
 	cout << "   done." << endl << flush;
 	return count;
 }
-#endif // !UNIX
+#endif
+
+
 
 //
 // Checking for all TCP network interfaces.  Storing them, and returning the number
@@ -362,19 +382,19 @@
 //
 int Manager::Report_TCP( Target_Spec *tcp_spec )
 {
-#if defined (_WIN32) || defined (_WIN64)
-	int 				retval;
-	WSADATA 			wd;
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+	int 			 retval;
+	WSADATA 		 wd;
 #endif
 	struct hostent		*hostinfo;
-	struct sockaddr_in	sin;
-	char				hostname[128];
-	int					count = 0;
-	int 				i;
+	struct sockaddr_in	 sin;
+	char			 hostname[128];
+	int			 count = 0;
+	int 			 i;
 
 	cout << "Reporting TCP network information..." << endl;
 
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	// initialize WinSock version 2.0
 	retval = WSAStartup( MAKEWORD(2, 0), &wd ); 
 	if ( retval != 0 )
@@ -438,7 +458,7 @@
 		count++;
 	#endif
 
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	// clean up WinSock
 	if ( WSACleanup() != 0 )
 	{
@@ -512,19 +532,21 @@
 				// Nic does not exist.  See if there is an environment variable
 				// mapping to another NIC name.
 				strcpy( env_var_name, vi_spec[count].name );
-	#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 				if ( !GetEnvironmentVariable( env_var_name, vi_spec[count].name,
 					MAX_NAME ) )
 				{
 					break;
 				}
-	#else//UNIX
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 				if ( getenv( env_var_name ) == NULL )
 					break;
 
 				strncpy( vi_spec[count].name, getenv( env_var_name ), 
 					MAX_NAME - 1 );
-	#endif
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
+#endif
 				// A mapping exists.  Try to open the VI NIC using the 
 				// environment variable setting.
 				if ( !nic.Open( vi_spec[count].name ) )
@@ -1284,14 +1306,16 @@
 	// Align all data transfers on a page boundary.  This will work for all disks
 	// with sector sizes that divide evenly into the page size - which is always
 	// the case.
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	VirtualFree( data, 0, MEM_RELEASE );
 	if ( !(data = VirtualAlloc( NULL, grunts[target]->access_spec.max_transfer, 
 		MEM_COMMIT, PAGE_READWRITE )) )
-#else // UNIX
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 	free(data);
 	errno = 0;
 	if ( !(data = valloc(grunts[target]->access_spec.max_transfer) ))
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 	{
 		// Could not allocate a larger buffer.  Signal failure.
--- IOMessage.h	Thu Oct 16 19:22:29 2003
+++ IOMessage.h.mod	Wed Oct 15 22:51:37 2003
@@ -50,7 +50,10 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-07-27 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               2003-07-27 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Removed the [BIG|LITTLE]_ENDIAN_ARCH defines.       ## */
 /* ##               - Cleanup the formatting.                             ## */
 /* ##               - Integrated the License Statement into this header.  ## */
--- IOPerformance.h	Thu Oct 16 19:22:29 2003
+++ IOPerformance.h.mod	Wed Oct 15 20:32:31 2003
@@ -53,7 +53,10 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               2003-07-19 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Removed IOTime.h inclusion (now in IOCommon.h)      ## */
 /* ##               - Integrated the License Statement into this header.  ## */
 /* ##               - Added new header holding the changelog.             ## */
@@ -66,31 +69,31 @@
 #include "IOCommon.h"
 
 
-#ifdef UNIX
-#include <stdio.h>
-#ifdef SOLARIS
-#include <kstat.h>
-#endif
-#include <sys/sysinfo.h>
-#include <sys/socket.h>
-#ifdef SOLARIS
-#include <sys/sockio.h>
-#endif
-#include <netinet/in.h>
-#include <net/if.h>
-
-#include <stropts.h>
-#ifdef SOLARIS
-#include <sys/stream.h>
-#include <sys/tihdr.h>
-#include <inet/mib2.h>
-#endif
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #include <stdio.h>
+ #if defined(IOMTR_OS_SOLARIS)
+  #include <kstat.h>
+ #endif
+ #include <sys/sysinfo.h>
+ #include <sys/socket.h>
+ #if defined(IOMTR_OS_SOLARIS)
+  #include <sys/sockio.h>
+ #endif
+ #include <netinet/in.h>
+ #include <net/if.h>
+
+ #include <stropts.h>
+ #if defined(IOMTR_OS_SOLARIS)
+  #include <sys/stream.h>
+  #include <sys/tihdr.h>
+  #include <inet/mib2.h>
+ #endif
 #endif
 
 #define MAX_PERF_SIZE	4096	// Initial memory size allocated to NT performance data.
 
 
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 // Bit masks to expose information about performance counter types.
 // See winperf.h for additional details about counter definitions.
 #define PERF_SIZE_MASK		0x00000300
@@ -155,24 +158,26 @@
 
 	__int64		time_counter[MAX_SNAPSHOTS];	// Time that NT performance snapshots were taken.
 	int			clock_tick;
-#ifdef SOLARIS
+#if defined(IOMTR_OS_SOLARIS)
 	double		timediff;
 	kstat_ctl_t	*kc;
 	char		nic_names[MAX_NUM_INTERFACES][IFNAMSIZ]; // array of pointers to hold network interface names.
 	struct strbuf	strbuf_ctl, strbuf_data;
 	int			streamfd;						// File descriptor to the stream.
 	char		*ctlbuf, *databuf;
-#elif defined(LINUX)
+#elif defined(IOMTR_OS_LINUX)
 	long long timediff;
-#else
+#elif defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	DWORDLONG timediff;
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 
 private:
-	int			Get_Processor_Count();
+	int		Get_Processor_Count();
 	double		Get_Processor_Speed();
 
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	void		Extract_Counters( DWORD perf_data_type, int snapshot );
 	void		Extract_CPU_Counters( int snapshot );
 	void		Extract_TCP_Counters( int snapshot );
@@ -186,7 +191,7 @@
 	double		Calculate_Stat( __int64 start_value, __int64 end_value, DWORD counter_type );
 #endif
 
-#ifdef UNIX
+#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 	void		Get_CPU_Counters(int snapshot);
 	void		Get_NI_Counters(int snapshot);
 	void		Get_TCP_Counters(int snapshot);
@@ -194,10 +199,10 @@
 
 	LPBYTE		perf_data;				// Pointer to performance data.
 	DWORD		perf_size;				// Size of performance data buffer.
-#if defined (_WIN32) || defined (_WIN64)
-	PERF_OBJECT_TYPE	*perf_object;	// pointer to NT performance data for a specific object
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+	PERF_OBJECT_TYPE		*perf_object;	// pointer to NT performance data for a specific object
 	PERF_INSTANCE_DEFINITION	*perf_instance; // pointer to an instance of a specific object
-	PERF_COUNTER_BLOCK	*perf_counters;	// pointer to NT performance counters for a specific instance of an object
+	PERF_COUNTER_BLOCK		*perf_counters;	// pointer to NT performance counters for a specific instance of an object
 #endif
 	//
 	// raw CPU performance counters for Windows NT
--- IOPerformanceLinux.cpp	Thu Oct 16 19:22:30 2003
+++ IOPerformanceLinux.cpp.mod	Wed Oct 15 20:38:21 2003
@@ -13,12 +13,52 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: - This content of this file should be merged into     ## */
 /* ##                 the generic IOPerformance.cpp file.                 ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-03-02 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-03-02 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Cleaned the code from Windows related stuff         ## */
 /* ##                 (doesn't make sense in a pure Linux context).       ## */
 /* ##               2003-03-02 (daniel.scheibli@edelbyte.org)             ## */
@@ -41,56 +81,9 @@
 /* ##                 (brings some minor changes to main() function).     ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                  Copyright (C) 1998-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOPerformanceLinux.cpp: Implementation of the Performance class, which
-// gets all system-wide performance information (CPU and network) from the
-// OS, for Linux.
-//
-//////////////////////////////////////////////////////////////////////
-/* ######################################################################### */
-
 #define PERFORMANCE_DETAILS	0 // Turn on to display additional performance messages.
+#if defined(IOMTR_OS_LINUX)
 
-#ifdef LINUX
 
 #include <assert.h>
 #include "IOPerformance.h"
--- IOPort.cpp	Thu Oct 16 19:22:31 2003
+++ IOPort.cpp.mod	Wed Oct 15 21:59:14 2003
@@ -4,8 +4,43 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Job .......: This class covers the communication between Iometer   ## */
-/* ##               and Dynamo.                                           ## */
+/* ##  Job .......: Implementation of generic methods for the Port class. ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
@@ -13,7 +48,11 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-04-25 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-04-25 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Updated the global debug flag (_DEBUG) handling     ## */
 /* ##                 of the source file (check for platform etc.).       ## */
 /* ##               2003-03-04 (joe@eiler.net)                            ## */
@@ -27,60 +66,10 @@
 /* ##                 gcc 3.2 (known as cout << hex error).               ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOPort.cpp: Implementation of generic methods for the Port class.
-//
-// Port objects are used for communication between Dynamo and Iometer.  The 
-// Port class is an abstract (pure virtual) class that defines the interface
-// and includes code common to all implementations.  The class PortTCP
-// provides a socket-based implementations of Port.  
-//
-// This file is used by both Iometer and Dynamo.
-//
-//////////////////////////////////////////////////////////////////////
-/* ######################################################################### */
 
-#if defined (_WIN32) || defined (_WIN64)
-#include "GalileoApp.h"
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
 
@@ -94,12 +83,12 @@
 //       will be a MFC hacker who could advice here.
 //       [1] = http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_debug_new.asp
 //
-#if defined (_WIN32) || defined (_WIN64)
-#ifdef _DEBUG
-#define new DEBUG_NEW
-#undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
-#endif
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #ifdef _DEBUG
+  #define new DEBUG_NEW
+  #undef THIS_FILE
+  static char THIS_FILE[] = __FILE__;
+ #endif
 #endif
 
 
@@ -143,12 +132,14 @@
 
 	if ( olap->hEvent )
 	{
-#ifdef UNIX
+#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 		cout << "Async Port objects not supported on UNIX" << endl;
 		return FALSE;
-#else // WIN32 || _WIN64
+#elif defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		DWORD d = WaitForSingleObject ( olap->hEvent, 0 );
 		return ( d == WAIT_OBJECT_0 );
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 	}
 	else
@@ -221,12 +212,17 @@
 		*errmsg << "Port::OutputErrMsg() called with invalid errmsg value!" << ends;
 	}
 
-#ifdef _WINDOWS
+// TODO: Totally wrong distinction - decission about Message Box
+//       vs. Output on the console is sometyhing based on ability
+//       (so running on Windows) AND mode (dialog vs. batch).
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	// Iometer
 	ErrorMessage( errmsg->str().c_str() );
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 	// Dynamo
 	cout << errmsg->str() << endl;
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 
 	// str() returns pointer to buffer and freezes it, we must call freeze(FALSE) to 
--- IOPort.h	Thu Oct 16 19:22:31 2003
+++ IOPort.h.mod	Wed Oct 15 22:01:15 2003
@@ -10,11 +10,51 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: <none>                                                ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-03-01 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-03-01 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Cut out the Windows Pipes support for               ## */
 /* ##                 communication efforts.                              ## */
 /* ##               2003-02-15 (daniel.scheibli@edelbyte.org)             ## */
@@ -23,60 +63,9 @@
 /* ##                 gcc 3.2 (known as cout << hex error).               ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOPort.h: Interface for the Port class.
-//
-// Port objects are used for communication between Dynamo and Iometer.  The 
-// Port class is an abstract (pure virtual) class that defines the interface
-// and includes code common to all implementations.  The class PortTCP
-// provides a socket-based implementations of Port.  
-//
-// This file is used by both Iometer and Dynamo.
-//
-//////////////////////////////////////////////////////////////////////
-/* ######################################################################### */
-
 #ifndef PORT_DEFINED
-	#define PORT_DEFINED
+#define PORT_DEFINED
+
 
 #include <sstream>
 using namespace std;
--- IOTarget.cpp	Thu Oct 16 19:22:31 2003
+++ IOTarget.cpp.mod	Wed Oct 15 22:54:44 2003
@@ -8,64 +8,55 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: <none>                                                ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-03-04 (joe@eiler.net)                            ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-03-04 (joe@eiler.net)                            ## */
 /* ##               - Added new header holding the changelog.             ## */
 /* ##               - Added an #ifdef SOLARIS since we are now using gcc  ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTarget.cpp: Implementation of generic methods for the Target class.
-//
-// Target is a pure virtual class that is used as a base class for any I/O
-// target, such as a disk or a network connection.  It does not contain 
-// any code except for the random number generator.  (Each Target object 
-// has its own random number generator; two Targets seeded with the same
-// value will produce the same series of random numbers.)
-//
-//////////////////////////////////////////////////////////////////////
 
 #include "IOTarget.h"
 
@@ -100,12 +91,14 @@
 // a = 4c + 1 (c user defined)
 // b is odd
 //
-#if defined(LINUX) || defined(SOLARIS)
-#define A 136204069LL			// 3x7x11x13x17x23x29x4 + 1
-#define B 28500701229LL		// 3x7x11x13x17x23x27x29x31
+#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
+ #define A 136204069LL		// 3x7x11x13x17x23x29x4 + 1
+ #define B 28500701229LL	// 3x7x11x13x17x23x27x29x31
+#elif defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #define A 136204069		// 3x7x11x13x17x23x29x4 + 1
+ #define B 28500701229		// 3x7x11x13x17x23x27x29x31
 #else
-#define A 136204069			// 3x7x11x13x17x23x29x4 + 1
-#define B 28500701229		// 3x7x11x13x17x23x27x29x31
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 
 DWORDLONG Target::Rand( void )
--- IOTarget.h	Thu Oct 16 19:22:31 2003
+++ IOTarget.h.mod	Wed Oct 15 22:56:39 2003
@@ -1,52 +1,67 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTarget.h: Interface for the Target class.
-//
-// Target is a pure virtual class that is used as a base class for any I/O
-// target, such as a disk or a network connection.  
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOTarget.h                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the Target class.                       ## */
+/* ##                                                                     ## */
+/* ##               Target is a pure virtual class that is used as a base ## */
+/* ##               class for any I/O target, such as a disk or a network ## */
+/* ##               connection.                                           ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef TARGET_DEFINED
-	#define TARGET_DEFINED
+#define TARGET_DEFINED
+
 
 #if _MSC_VER >= 1000
 #pragma once
--- IOTargetDisk.cpp	Thu Oct 16 19:22:48 2003
+++ IOTargetDisk.cpp.mod	Wed Oct 15 20:10:58 2003
@@ -8,11 +8,51 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: <none>                                                ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-03-28 (joe@eiler.net)                            ## */
+/* ##  Changes ...: 2003-08-05 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-03-28 (joe@eiler.net)                            ## */
 /* ##               - changes so VC++ 7 (.NET) will compile correctly.    ## */
 /* ##               2003-03-05 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Removed LINUX_DEBUG, because it is redundant.       ## */
@@ -33,84 +73,44 @@
 /* ##                 to the flags field of the open() function calls).   ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTargetDisk.cpp: Implementation of the Target class for disks.
-// TargetDisk includes all the code that actually accesses a disk target.
-//
-//////////////////////////////////////////////////////////////////////
-/* ######################################################################### */
+
 
 #include "IOTargetDisk.h"
 #include "IOAccess.h"
 
-#define _DISK_MSGS 0
 
-#ifdef UNIX
-#ifdef WORKAROUND_MOD_BUG
-#include <math.h>
-#endif // WORKAROUND_MOD_BUG
+#define _DISK_MSGS 0
 
-#ifdef SOLARIS
-#if defined(__i386) || defined (_IA64)
-// highly specific to Solaris on Intel
-#include <sys/dktp/fdisk.h>
-#endif // __i386 || _IA64
-#include <sys/statvfs.h>
-#include <sys/stat.h>
-#include <sys/dkio.h>
-#include <sys/vtoc.h>
-#endif // SOLARIS
 
-#ifdef LINUX
-#include <assert.h>
-#include <sys/vfs.h>
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #ifdef WORKAROUND_MOD_BUG
+  #include <math.h>
+ #endif // WORKAROUND_MOD_BUG
+
+ #if defined(IOMTR_OS_SOLARIS)
+  #if defined(IOMTR_CPU_I386) || defined(IOMTR_CPU_IA64)
+   // highly specific to Solaris on Intel
+   #include <sys/dktp/fdisk.h>
+  #endif
+  #include <sys/statvfs.h>
+  #include <sys/stat.h>
+  #include <sys/dkio.h>
+  #include <sys/vtoc.h>
+ #endif
+
+ #if defined(IOMTR_OS_LINUX)
+  #include <assert.h>
+  #include <sys/vfs.h>
+ #endif
 #endif
 
-#endif // UNIX
+
 
 /**********************************************************************
  * Forward Declarations
  **********************************************************************/
-#ifdef LINUX
+#if defined(IOMTR_OS_LINUX)
 static int getSectorSizeOfPhysDisk(const char *devName);
 static long long getSizeOfPhysDisk(const char *devName);
 static BOOL getDevNums(const char *devName, int *major, int *minor);
@@ -118,6 +118,7 @@
 #endif
 
 
+
 //
 // Constructor.
 //
@@ -125,13 +126,15 @@
 {
 	sector_align_mask = NOT_POWER_OF_TWO;
 
-#ifdef UNIX
-  disk_file = (HANDLE)&file_handle;
+#if defined(IOMTR_OSFAMILY_UNIX)
+	disk_file = (HANDLE)&file_handle;
 #endif
 }
 
 
 
+
+
 //
 // Initializing the disk based on the specified target information.
 //
@@ -143,17 +146,20 @@
 	memcpy( &spec, target_info, sizeof( Target_Spec ) );
 
 	// Initializing logical disks.
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	if ( IsType( target_info->type, LogicalDiskType ) )
 		retval = Init_Logical( spec.name[0] );
 	else if ( IsType( target_info->type, PhysicalDiskType ) )
 		retval = Init_Physical( atoi( spec.name + 14 ) );
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 	if ( IsType( target_info->type, LogicalDiskType ) )
 		retval = Init_Logical( spec.name );
 	else if ( IsType( target_info->type, PhysicalDiskType ) )
 		retval = Init_Physical( spec.name );
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
+
 	else
 	{
 		cout << "*** Invalid disk type in TargetDisk::Initialize()." << endl;
@@ -165,7 +171,12 @@
 		// Setting size of disk, if it was successfully initialized
 		Set_Size( spec.disk_info.maximum_size );
 
-#ifdef _sparc
+#if defined(IOMTR_CPU_SPARC)
+ // To tell the truth, I have no idear, if this is
+ // a.) Only specific to the Sparc systems (so Linux on Sparc has to do the same)
+ // b.) Only specific to the Solaris operating system (so Solaris on i386 has to do the same)
+ // c.) Specific to the Sparc system / Solaris operating system combination (current implementation)
+ #if defined(IOMTR_OS_SOLARIS)
 		if (spec.disk_info.starting_sector)
 			Set_Starting_Sector( spec.disk_info.starting_sector);
 		else
@@ -180,16 +191,24 @@
 				//
 				Set_Starting_Sector( 1 );
 			}
-#else // _sparc
+ #else    			
+  #error ===> ERROR: Broken port, advice needed!
+ #endif
+#elif defined(IOMTR_CPU_I386) || defined(IOMTR_CPU_IA64)
 		Set_Starting_Sector( spec.disk_info.starting_sector );
-#endif // _sparc
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
+#endif
 	}
 
 	return retval;
 } 
 
 
-#if defined (_WIN32) || defined (_WIN64)
+
+
+
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 //
 // Initialize a logical disk drive.  Logical drives are accessed through
 // a drive letter and may be local or remote.
@@ -209,7 +228,7 @@
 	// Getting size information about the drive.
 	return( Set_Sizes() );
 }
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 // UNIX logical drives are accessed through path names.
 BOOL TargetDisk::Init_Logical( char *drive )
 {
@@ -242,10 +261,15 @@
 	// Getting size information about the drive.
 	return( Set_Sizes() );
 }
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 
 
-#if defined (_WIN32) || defined (_WIN64)
+
+
+
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 //
 // Initialize a physical disk drive.  Physical drives are accessed below
 // the file system layer for RAW access.  As a result, data corruption could
@@ -267,7 +291,7 @@
 	// Getting information about the size of the drive.
 	return( Set_Sizes() );
 }
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 BOOL TargetDisk::Init_Physical( char *drive )
 {
 	// Setting the spec.name of the drive.
@@ -298,8 +322,14 @@
 	// Getting information about the size of the drive.
 	return( Set_Sizes() );
 }
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 
+
+
+
+
 //
 // Setting the maximum amount of disk space to access during testing.
 //
@@ -326,6 +356,8 @@
 
 
 
+
+
 //
 // Setting the starting sector of the disk where accesses should begin.
 // This needs to be called after setting the size of the disk (call to Set_Size).
@@ -362,13 +394,15 @@
 
 
 
+
+
 //
 // Setting information about the physical size of the drive.  This is
 // used in order to guarantee that accesses to the drive are permitted,
 // that is align on the sector sizes, and to allow random accesses over
 // the entire drive.
 //
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 BOOL TargetDisk::Set_Sizes( BOOL open_disk )
 {
 	DWORD		i;
@@ -471,18 +505,114 @@
 		return FALSE;
 	}
 }
-#elif defined(SOLARIS)
+#elif defined(IOMTR_OS_LINUX)
+//
+// Performs same function as the win32 || _WIN64 version.
+//
+BOOL TargetDisk::Set_Sizes( BOOL open_disk )
+{
+	struct stat fileInfo;
+	struct statfs fsInfo;
+	int statResult;
+	int fd = -1;
+	char filesysName[MAX_NAME];
+
+	if (open_disk) {
+		if (!Open(NULL)) {
+#ifdef _DEBUG
+			cout << __FUNCTION__ << ": Open on \"" << file_name <<
+				"\" failed (error " << strerror(errno) << ").\n";
+#endif			
+			return(FALSE);
+		}
+		fd = ((struct File *)disk_file)->fd;
+	}
+	if (IsType(spec.type, LogicalDiskType)) {
+		/*
+		 * For logical disks, we use statfs and stat to find the size of the
+		 * file system, the size of the test file, the sector size for the
+		 * file system, etc. Pretty straightforward, standard Unix stuff.
+		 */
+		strcpy(filesysName, file_name);
+		filesysName[strlen(filesysName) - strlen(TEST_FILE)] = '\0';
+		if (open_disk) {
+			statResult = fstatfs(fd, &fsInfo);
+		} else {
+			statResult = statfs(filesysName, &fsInfo);
+		}
+		if (statResult < 0) {
+			cerr << __FUNCTION__ << ": Couldn't statfs logical disk file!\n";
+			if (open_disk) {
+				Close(NULL);
+			}
+			return(FALSE);
+		}
+		spec.disk_info.sector_size = fsInfo.f_bsize;
+		sector_align_mask = ~((DWORDLONG)fsInfo.f_bsize - 1);
+		/* Free blocks is "f_bfree". */
+		if (open_disk) {
+			statResult = fstat(fd, &fileInfo);
+		} else {
+			statResult = stat(file_name, &fileInfo);
+		}
+		if (statResult < 0) {
+			cerr << __FUNCTION__ << ": Error " << strerror(errno) <<
+				"statting file " << file_name << "\n";
+			if (open_disk) {
+				Close(NULL);
+			}
+			return(FALSE);
+		}
+		size = fileInfo.st_size;
+		if (size == 0) {
+			spec.disk_info.ready = FALSE;
+			if (open_disk) {
+				Close(NULL);
+			}
+			unlink(file_name);
+			return(TRUE);
+		}
+		ending_position = size;
+		spec.disk_info.ready = TRUE;
+		if (open_disk) {
+			Close(NULL);
+		}
+		return(TRUE);
+	} else {
+		spec.disk_info.sector_size = getSectorSizeOfPhysDisk(file_name);
+		if (spec.disk_info.sector_size == 0) {
+			cerr << __FUNCTION__ << ": Failed to get sector size. Aborting " <<
+				"target.\n";
+			if (open_disk) {
+				Close(NULL);
+			}
+			return(FALSE);
+		}
+		size = getSizeOfPhysDisk(file_name);
+		alignment = 0;
+		sector_align_mask = ~((DWORDLONG)spec.disk_info.sector_size - 1);
+		ending_position = size;
+		offset = 0;
+		bytes_transferred = 0;
+		spec.disk_info.ready = TRUE;
+		if (open_disk) {
+			Close(NULL);
+		}
+		return(TRUE);
+	}
+}
+#elif defined(IOMTR_OS_SOLARIS)
 int TargetDisk::Set_Sizes( BOOL open_disk )
 {
-	DWORD				fd;
-//  DWORD       i;
-//	DWORD				low_size, high_size;
-//	DWORD				sectors_per_cluster, free_clusters, total_clusters;
-//	BOOL				foundPartitions = FALSE;
-//	DWORD				disk_info_size;
+	DWORD			fd;
+// 	DWORD       		i;
+//	DWORD			low_size, high_size;
+//	DWORD			sectors_per_cluster, free_clusters, total_clusters;
+//	BOOL			foundPartitions = FALSE;
+//	DWORD			disk_info_size;
 	struct statvfs		st;
 	struct dk_geom		disk_geo_info;
-	struct vtoc			disk_vtoc;
+	struct vtoc		disk_vtoc;
 
 	// Logical and physical drives are treated differently.
 	if ( open_disk )
@@ -570,9 +700,9 @@
 					return(FALSE);
 				}
 			}
-#if defined (__i386) || defined (_IA64)
+#if defined(IOMTR_CPU_I386) || defined(IOMTR_CPU_IA64)
 			else
-		{
+			{
 				// We are dealing with an fdisk partition.
 				size = Get_Partition_Size(part_name, part);
 #ifdef _DEBUG
@@ -643,114 +773,10 @@
 		return ( FALSE );
 	}		
 }
-#endif /* UNIX */
-
-
-#ifdef UNIX
-#ifdef SOLARIS
-#if defined (__i386) || defined (_IA64)
-// highly specific to Solaris on Intel
-BOOL TargetDisk::Look_For_Partitions()
-{
-	char buffer[512];
-	int bytes_read, i;
-	struct mboot *mb;
-	struct ipart *ip;
-	struct File		*fp;
-
-	fp = (struct File *)disk_file;
-	if ((bytes_read = read(fp->fd, buffer, SECTOR_SIZE)) < SECTOR_SIZE)
-	{
-		// cannot read from the disk. So we should try to use it.
-		// simply return (TRUE) indicating that it has partitions.
-		return(TRUE);
-	}
-
-	//
-	// We have read 512 bytes of the first cylinder, first sector.
-	// It contains the master boot record, the partition table and mboot signature (viz 0xAA55)
-	//
-	mb = (struct mboot *)buffer;
-	if (mb->signature != MBB_MAGIC)
-		// Hmmm... This drive appears to be freshly formatted. guess we can report it.!
-		return(FALSE);
-	else
-	{
-		// well, we did have a valid signature in the mboot. Look for valid partitions.
-		for (i = 0; i < FD_NUMPART; i++)
-		{
-			ip = (struct ipart *) (buffer + BOOTSZ + (i * sizeof(struct ipart)));
-			if (ip->numsect || ip->relsect)
-				return(TRUE);
-		}
-	}
-	return(FALSE);
-}
-
-DWORDLONG TargetDisk::Get_Partition_Size(char *part_name, int part)
-{
-	char disk_name[MAX_NAME];
-	char buffer[512];
-	int bytes_read, fd;
-	struct ipart *ip;
-	int length;
-
-	length = strlen(part_name);
-	part_name[length-1] = '0'; 		// Converting cXtXdXpX to cXtXdXp0
-	sprintf(disk_name, "%s/%s", RAW_DEVICE_DIR, part_name);
-	fd = open(disk_name, O_RDONLY);
-	if (fd < 0)
-	{
-		return(0);
-	}
-
-	if ((bytes_read = read(fd, buffer, SECTOR_SIZE)) < SECTOR_SIZE)
-	{
-		close(fd);
-		return(0);
-	}
-
-	//
-	// We have read 512 bytes of the first cylinder, first sector.
-	// It contains the master boot record, the partition table and mboot signature (viz 0xAA55)
-	//
-	close(fd);
-	ip = (struct ipart *) (buffer + BOOTSZ + ((part-1) * sizeof(struct ipart)));
-	return((DWORDLONG)ip->numsect * SECTOR_SIZE);
-}
-#endif // __i386 || _IA64
-
-DWORDLONG TargetDisk::Get_Slice_Size(char *part_name, int part)
-{
-	char disk_name[MAX_NAME];
-//	int bytes_read;
-  int fd;
-	struct vtoc this_vtoc;
-	int length;
-
-	length = strlen(part_name);
-	part_name[length-1] = '2'; 		// Converting cXtXdXsX to cXtXdXs2
-	sprintf(disk_name, "%s/%s", RAW_DEVICE_DIR, part_name);
-	fd = open(disk_name, O_RDONLY);
-	if (fd < 0)
-	{
-		return(0);
-	}
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
+#endif
 
-	if (ioctl(fd, DKIOCGVTOC, &this_vtoc) < 0)
-	{
-		close(fd);
-		return(0);
-	}
-	//
-	// We have the vtoc.
-	// It contains the slice info (including size).
-	//
-	close(fd);
-	return((DWORDLONG)this_vtoc.v_part[part].p_size * this_vtoc.v_sectorsz);
-}
-#endif // SOLARIS
-#endif // UNIX
 
 
 
@@ -789,6 +815,9 @@
 }
 
 
+
+
+
 #define PREPARE_QDEPTH	16
 
 //
@@ -825,7 +854,7 @@
 		// Create an event.
 		olap[i].hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
 
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 		SetQueueSize(olap[i].hEvent, 1);
 #endif
 
@@ -851,7 +880,7 @@
 		//     handle whose low-order bit is set keeps I/O completion from being 
 		//     queued to the completion port. 
 		//
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		olap[i].hEvent = (HANDLE) ( (UINT_PTR) olap[i].hEvent | 0x0000000000000001 );
 #else
 		olap[i].hEvent = (HANDLE) ( (unsigned long) olap[i].hEvent | 0x00000001 );
@@ -1027,7 +1056,7 @@
 	// Destroy the events.
 	for ( i = 0; i < PREPARE_QDEPTH; i++ )
 	{
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 		// Reset the handles.
 		olap[i].hEvent = (HANDLE)((unsigned int) olap[i].hEvent ^ 0x1);
 #endif
@@ -1042,6 +1071,8 @@
 
 
 
+
+
 //
 // Opening a disk for low-level access.
 //
@@ -1052,24 +1083,22 @@
 	{
 		// Ignore errors that occur if trying to open a floppy or CD-ROM with
 		// nothing in the drive.
-#ifdef SOLARIS
+#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 		((struct File *)disk_file)->fd = open(file_name, O_RDWR|O_CREAT|O_LARGEFILE|open_flag, S_IRUSR|S_IWUSR);
-#elif defined(LINUX)
-		((struct File *)disk_file)->fd = open(file_name, O_RDWR|O_CREAT|O_LARGEFILE|open_flag, S_IRUSR|S_IWUSR);
-#else  // WIN32 || _WIN64
+#elif defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		SetErrorMode( SEM_FAILCRITICALERRORS );
 		disk_file = CreateFile( file_name, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | 
 			FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL );
 		SetErrorMode( 0 );
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 	}
 	else if ( IsType( spec.type, PhysicalDiskType ) )
 	{
-#ifdef SOLARIS
+#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 		((struct File *)disk_file)->fd = open(file_name, O_RDWR|O_LARGEFILE, S_IRUSR|S_IWUSR);
-#elif defined(LINUX)
-		((struct File *)disk_file)->fd = open(file_name, O_RDWR|O_LARGEFILE, S_IRUSR|S_IWUSR);
-#else // WIN32 || _WIN64
+#elif defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		SetErrorMode( SEM_FAILCRITICALERRORS );
 		disk_file = CreateFile(file_name, GENERIC_READ | GENERIC_WRITE,
 													 FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
@@ -1077,6 +1106,8 @@
 													 FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED,
 													 NULL );
 		SetErrorMode( 0 );
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 	}
 	else
@@ -1088,10 +1119,12 @@
 	#if _DISK_MSGS
 		cout << "Opening disk " << spec.name << endl;
 	#endif
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	if ( disk_file == INVALID_HANDLE_VALUE )
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)	
 	if ( ((struct File *)disk_file)->fd == (int)INVALID_HANDLE_VALUE )
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 		return FALSE;
 
@@ -1107,6 +1140,9 @@
 }
 
 
+
+
+
 //
 // Closing the disk handle.
 //
@@ -1115,10 +1151,12 @@
 	// Note that test_state is not used.  It IS used by network targets.
 
 	// If testing connection rate, the disk may already be closed.
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	if ( disk_file == INVALID_HANDLE_VALUE )
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 	if ( ((struct File *)disk_file)->fd == (int)INVALID_HANDLE_VALUE )
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 	{
 		#if _DISK_MSGS
@@ -1131,10 +1169,12 @@
 		cout << "Closing disk " << spec.name << endl;
 	#endif
 
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	if ( !CloseHandle( disk_file ) )
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 	if ( !CloseHandle( disk_file, FILE_ELEMENT) )
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 	{
 		cout << "*** Error " << GetLastError() 
@@ -1142,16 +1182,182 @@
 		SetLastError( 0 );
 		return FALSE;
 	}
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	disk_file = INVALID_HANDLE_VALUE;
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 	((struct File *)disk_file)->fd = (int)INVALID_HANDLE_VALUE;
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 	return TRUE;
 }
 
 
 
+
+
+//
+// Seek to another position on the disk.  Whether this is a random seek or a sequential
+// seek will be determined by the value of the first parameter.  This does not actually
+// move the disk head, it just updates the offset of the next I/O request.
+//
+// Calling instructions:
+//
+// 1) If user enters an alignment which is a power of two, pass in the user_alignment
+//		the user specified and the precalculated user_align_mask.
+//		This uses fast byte alignment code.
+// 2) If user enters an alignment which is NOT a power of two, pass in the user_alignment
+//		the user specified and NOT_POWER_OF_TWO for user_align_mask.
+//		This uses slower byte alignment code.
+// 3) If user enters an alignment of 0 (zero), sector alignment is assumed.  Pass in
+//		zeroes for both byte_alignment and user_align_mask.
+//		This uses fast byte alignment code as long as the sector size is a power
+//		of two, otherwise it reverts to slower code.
+//
+void TargetDisk::Seek( BOOL random, DWORD request_size, DWORD user_alignment,
+	DWORDLONG user_align_mask )
+{
+	static DWORDLONG remainder;	// static for performance reasons
+
+	// Find out if this is a random seek.
+	if ( random )
+	{
+		// Set the offset to a random location on the disk.
+#if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
+		offset = starting_position + (DWORDLONG)fmod(Rand(), size);
+#else
+		offset = starting_position + Rand() % size;
+#endif
+	}
+	else
+	{
+		// Adjusting the offset pointer by the last number of bytes successfully transferred.
+		offset += (DWORDLONG) bytes_transferred;
+	}
+
+	switch (user_align_mask)
+	{
+	case NOT_POWER_OF_TWO:
+		// If not at a user_alignment boundary, move offset ahead to next one.
+		if ((remainder = offset % user_alignment))
+			offset += user_alignment - remainder;
+
+		// See if we're near the end of the file and need to return to the start.
+		if ( (offset + (DWORDLONG) request_size) > ending_position )
+		{
+			offset = starting_position;
+
+			// starting_position won't necessarily be byte-aligned.
+			if ((remainder = offset % user_alignment))
+			{
+				offset += user_alignment - remainder;
+
+				// If we went beyond the end of the disk again, report an error.
+				#if _DEBUG
+					if ( (offset + (DWORDLONG) request_size) > ending_position )
+					{
+						cout << "*** Can't align on " << user_alignment
+							 << " byte boundaries" << endl;
+
+						offset = starting_position;
+					}
+				#endif
+			}
+		}
+		break;
+
+	case 0:
+		// Assume sector alignment.
+		if ( sector_align_mask == NOT_POWER_OF_TWO )
+		{
+			if ((remainder = offset % spec.disk_info.sector_size))
+				offset += spec.disk_info.sector_size - remainder;
+		}
+		else
+		{
+			if ( offset != (offset & sector_align_mask) )
+				offset = (offset + spec.disk_info.sector_size) & sector_align_mask;
+		}
+
+		// See if we're near the end of the file and need to return to the start.
+		if ( (offset + (DWORDLONG) request_size) > ending_position )
+		{
+			offset = starting_position;
+
+			// starting_position won't necessarily be sector-aligned.
+			if ( sector_align_mask == NOT_POWER_OF_TWO )
+			{
+				if ((remainder = offset % spec.disk_info.sector_size))
+				{
+					offset += spec.disk_info.sector_size - remainder;
+
+					// If we went beyond the end of the disk again, report an error.
+					#if _DEBUG
+						if ( (offset + (DWORDLONG) request_size) > ending_position )
+						{
+							cout << "*** Can't align on " << spec.disk_info.sector_size
+								 << " byte boundaries" << endl;
+
+							offset = starting_position;
+						}
+					#endif
+				}
+			}
+			else
+			{
+				if ( offset != (offset & sector_align_mask) )
+				{
+					offset = (offset + spec.disk_info.sector_size) & sector_align_mask;
+
+					// If we went beyond the end of the disk again, report an error.
+					#if _DEBUG
+						if ( (offset + (DWORDLONG) request_size) > ending_position )
+						{
+							cout << "*** ERROR: Can't align on " << spec.disk_info.sector_size
+								 << " byte boundaries" << endl;
+
+							offset = starting_position;
+						}
+					#endif
+				}
+			}
+		}
+		break;
+	
+	default:
+		// If not at a user_alignment boundary, move offset ahead to next one.
+		if ( offset != (offset & user_align_mask) )
+			offset = (offset + user_alignment) & user_align_mask;
+
+		// See if we're near the end of the file and need to return to the start.
+		if ( (offset + (DWORDLONG) request_size) > ending_position )
+		{
+			offset = starting_position;
+
+			// starting_position won't necessarily be byte-aligned.
+			if ( offset != (offset & user_align_mask) )
+			{
+				offset = (offset + user_alignment) & sector_align_mask;
+
+				// If we went beyond the end of the disk again, report an error.
+				#if _DEBUG
+					if ( (offset + (DWORDLONG) request_size) > ending_position )
+					{
+						cout << "*** Can't align on " << alignment
+							 << " byte boundaries" << endl;
+
+						offset = starting_position;
+					}
+				#endif
+			}
+		}
+	}
+}
+
+
+
+
+
 //
 // Reading a user specified amount of data from the drive and returning it.
 // This does not check the request size to be a multiple of the sector size 
@@ -1192,7 +1398,7 @@
 	{
 		// Read succeeded immediately, but completion is pending.  It will
 		// still go to the completion queue.
-#if defined(UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
+#if defined(IOMTR_OSFAMILY_UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
 		// This code blocks reading the completion Q for the immediately completed I/Os.
 		error_no = 0;
 		// this is for the next sequential I/O.
@@ -1234,6 +1440,8 @@
 
 
 
+
+
 //
 // Writing a user defined buffer to the drive.  This does not check the request size 
 // to be a multiple of the sector size (except in debug).  For performance reasons,
@@ -1275,7 +1483,7 @@
 	{
 		// Write succeeded immediately, but completion is pending.  It will
 		// still go to the completion queue.
-#if defined(UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
+#if defined(IOMTR_OSFAMILY_UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
 		// This code blocks reading the completion Q for the immediately completed I/Os.
 		error_no = 0;
 		// this is for the next sequential I/O.
@@ -1317,262 +1525,114 @@
 
 
 
-//
-// Seek to another position on the disk.  Whether this is a random seek or a sequential
-// seek will be determined by the value of the first parameter.  This does not actually
-// move the disk head, it just updates the offset of the next I/O request.
-//
-// Calling instructions:
-//
-// 1) If user enters an alignment which is a power of two, pass in the user_alignment
-//		the user specified and the precalculated user_align_mask.
-//		This uses fast byte alignment code.
-// 2) If user enters an alignment which is NOT a power of two, pass in the user_alignment
-//		the user specified and NOT_POWER_OF_TWO for user_align_mask.
-//		This uses slower byte alignment code.
-// 3) If user enters an alignment of 0 (zero), sector alignment is assumed.  Pass in
-//		zeroes for both byte_alignment and user_align_mask.
-//		This uses fast byte alignment code as long as the sector size is a power
-//		of two, otherwise it reverts to slower code.
-//
-void TargetDisk::Seek( BOOL random, DWORD request_size, DWORD user_alignment,
-	DWORDLONG user_align_mask )
+
+
+#if defined(IOMTR_OSFAMILY_UNIX)
+#if defined(IOMTR_OS_SOLARIS)
+#if defined(IOMTR_CPU_I386) || defined(IOMTR_CPU_IA64)
+// highly specific to Solaris on Intel
+BOOL TargetDisk::Look_For_Partitions()
 {
-	static DWORDLONG remainder;	// static for performance reasons
+	char buffer[512];
+	int bytes_read, i;
+	struct mboot *mb;
+	struct ipart *ip;
+	struct File		*fp;
 
-	// Find out if this is a random seek.
-	if ( random )
-	{
-		// Set the offset to a random location on the disk.
-#if defined(UNIX) && defined(WORKAROUND_MOD_BUG)
-		offset = starting_position + (DWORDLONG)fmod(Rand(), size);
-#else
-		offset = starting_position + Rand() % size;
-#endif
-	}
-	else
+	fp = (struct File *)disk_file;
+	if ((bytes_read = read(fp->fd, buffer, SECTOR_SIZE)) < SECTOR_SIZE)
 	{
-		// Adjusting the offset pointer by the last number of bytes successfully transferred.
-		offset += (DWORDLONG) bytes_transferred;
+		// cannot read from the disk. So we should try to use it.
+		// simply return (TRUE) indicating that it has partitions.
+		return(TRUE);
 	}
 
-	switch (user_align_mask)
+	//
+	// We have read 512 bytes of the first cylinder, first sector.
+	// It contains the master boot record, the partition table and mboot signature (viz 0xAA55)
+	//
+	mb = (struct mboot *)buffer;
+	if (mb->signature != MBB_MAGIC)
+		// Hmmm... This drive appears to be freshly formatted. guess we can report it.!
+		return(FALSE);
+	else
 	{
-	case NOT_POWER_OF_TWO:
-		// If not at a user_alignment boundary, move offset ahead to next one.
-		if ((remainder = offset % user_alignment))
-			offset += user_alignment - remainder;
-
-		// See if we're near the end of the file and need to return to the start.
-		if ( (offset + (DWORDLONG) request_size) > ending_position )
-		{
-			offset = starting_position;
-
-			// starting_position won't necessarily be byte-aligned.
-			if ((remainder = offset % user_alignment))
-			{
-				offset += user_alignment - remainder;
-
-				// If we went beyond the end of the disk again, report an error.
-				#if _DEBUG
-					if ( (offset + (DWORDLONG) request_size) > ending_position )
-					{
-						cout << "*** Can't align on " << user_alignment
-							 << " byte boundaries" << endl;
-
-						offset = starting_position;
-					}
-				#endif
-			}
-		}
-		break;
-
-	case 0:
-		// Assume sector alignment.
-		if ( sector_align_mask == NOT_POWER_OF_TWO )
-		{
-			if ((remainder = offset % spec.disk_info.sector_size))
-				offset += spec.disk_info.sector_size - remainder;
-		}
-		else
-		{
-			if ( offset != (offset & sector_align_mask) )
-				offset = (offset + spec.disk_info.sector_size) & sector_align_mask;
-		}
-
-		// See if we're near the end of the file and need to return to the start.
-		if ( (offset + (DWORDLONG) request_size) > ending_position )
+		// well, we did have a valid signature in the mboot. Look for valid partitions.
+		for (i = 0; i < FD_NUMPART; i++)
 		{
-			offset = starting_position;
-
-			// starting_position won't necessarily be sector-aligned.
-			if ( sector_align_mask == NOT_POWER_OF_TWO )
-			{
-				if ((remainder = offset % spec.disk_info.sector_size))
-				{
-					offset += spec.disk_info.sector_size - remainder;
-
-					// If we went beyond the end of the disk again, report an error.
-					#if _DEBUG
-						if ( (offset + (DWORDLONG) request_size) > ending_position )
-						{
-							cout << "*** Can't align on " << spec.disk_info.sector_size
-								 << " byte boundaries" << endl;
-
-							offset = starting_position;
-						}
-					#endif
-				}
-			}
-			else
-			{
-				if ( offset != (offset & sector_align_mask) )
-				{
-					offset = (offset + spec.disk_info.sector_size) & sector_align_mask;
-
-					// If we went beyond the end of the disk again, report an error.
-					#if _DEBUG
-						if ( (offset + (DWORDLONG) request_size) > ending_position )
-						{
-							cout << "*** ERROR: Can't align on " << spec.disk_info.sector_size
-								 << " byte boundaries" << endl;
-
-							offset = starting_position;
-						}
-					#endif
-				}
-			}
+			ip = (struct ipart *) (buffer + BOOTSZ + (i * sizeof(struct ipart)));
+			if (ip->numsect || ip->relsect)
+				return(TRUE);
 		}
-		break;
-	
-	default:
-		// If not at a user_alignment boundary, move offset ahead to next one.
-		if ( offset != (offset & user_align_mask) )
-			offset = (offset + user_alignment) & user_align_mask;
-
-		// See if we're near the end of the file and need to return to the start.
-		if ( (offset + (DWORDLONG) request_size) > ending_position )
-		{
-			offset = starting_position;
+	}
+	return(FALSE);
+}
 
-			// starting_position won't necessarily be byte-aligned.
-			if ( offset != (offset & user_align_mask) )
-			{
-				offset = (offset + user_alignment) & sector_align_mask;
+DWORDLONG TargetDisk::Get_Partition_Size(char *part_name, int part)
+{
+	char disk_name[MAX_NAME];
+	char buffer[512];
+	int bytes_read, fd;
+	struct ipart *ip;
+	int length;
 
-				// If we went beyond the end of the disk again, report an error.
-				#if _DEBUG
-					if ( (offset + (DWORDLONG) request_size) > ending_position )
-					{
-						cout << "*** Can't align on " << alignment
-							 << " byte boundaries" << endl;
+	length = strlen(part_name);
+	part_name[length-1] = '0'; 		// Converting cXtXdXpX to cXtXdXp0
+	sprintf(disk_name, "%s/%s", RAW_DEVICE_DIR, part_name);
+	fd = open(disk_name, O_RDONLY);
+	if (fd < 0)
+	{
+		return(0);
+	}
 
-						offset = starting_position;
-					}
-				#endif
-			}
-		}
+	if ((bytes_read = read(fd, buffer, SECTOR_SIZE)) < SECTOR_SIZE)
+	{
+		close(fd);
+		return(0);
 	}
-}
 
-#ifdef LINUX
+	//
+	// We have read 512 bytes of the first cylinder, first sector.
+	// It contains the master boot record, the partition table and mboot signature (viz 0xAA55)
+	//
+	close(fd);
+	ip = (struct ipart *) (buffer + BOOTSZ + ((part-1) * sizeof(struct ipart)));
+	return((DWORDLONG)ip->numsect * SECTOR_SIZE);
+}
+#endif // __i386 || _IA64
 
-//
-// Performs same function as the win32 || _WIN64 version.
-//
-BOOL TargetDisk::Set_Sizes(BOOL open_disk) {
-	struct stat fileInfo;
-	struct statfs fsInfo;
-	int statResult;
-	int fd = -1;
-	char filesysName[MAX_NAME];
+DWORDLONG TargetDisk::Get_Slice_Size(char *part_name, int part)
+{
+	char disk_name[MAX_NAME];
+//	int bytes_read;
+  int fd;
+	struct vtoc this_vtoc;
+	int length;
 
-	if (open_disk) {
-		if (!Open(NULL)) {
-#ifdef _DEBUG
-			cout << __FUNCTION__ << ": Open on \"" << file_name <<
-				"\" failed (error " << strerror(errno) << ").\n";
-#endif			
-			return(FALSE);
-		}
-		fd = ((struct File *)disk_file)->fd;
+	length = strlen(part_name);
+	part_name[length-1] = '2'; 		// Converting cXtXdXsX to cXtXdXs2
+	sprintf(disk_name, "%s/%s", RAW_DEVICE_DIR, part_name);
+	fd = open(disk_name, O_RDONLY);
+	if (fd < 0)
+	{
+		return(0);
 	}
-	if (IsType(spec.type, LogicalDiskType)) {
-    /*
-		 * For logical disks, we use statfs and stat to find the size of the
-		 * file system, the size of the test file, the sector size for the
-		 * file system, etc. Pretty straightforward, standard Unix stuff.
-		 */
-		strcpy(filesysName, file_name);
-		filesysName[strlen(filesysName) - strlen(TEST_FILE)] = '\0';
-		if (open_disk) {
-			statResult = fstatfs(fd, &fsInfo);
-		} else {
-			statResult = statfs(filesysName, &fsInfo);
-		}
-		if (statResult < 0) {
-			cerr << __FUNCTION__ << ": Couldn't statfs logical disk file!\n";
-			if (open_disk) {
-				Close(NULL);
-			}
-			return(FALSE);
-		}
-		spec.disk_info.sector_size = fsInfo.f_bsize;
-		sector_align_mask = ~((DWORDLONG)fsInfo.f_bsize - 1);
-		/* Free blocks is "f_bfree". */
-		if (open_disk) {
-			statResult = fstat(fd, &fileInfo);
-		} else {
-			statResult = stat(file_name, &fileInfo);
-		}
-		if (statResult < 0) {
-			cerr << __FUNCTION__ << ": Error " << strerror(errno) <<
-				"statting file " << file_name << "\n";
-			if (open_disk) {
-				Close(NULL);
-			}
-			return(FALSE);
-		}
-		size = fileInfo.st_size;
-		if (size == 0) {
-			spec.disk_info.ready = FALSE;
-			if (open_disk) {
-				Close(NULL);
-			}
-			unlink(file_name);
-			return(TRUE);
-		}
-		ending_position = size;
-		spec.disk_info.ready = TRUE;
-		if (open_disk) {
-			Close(NULL);
-		}
-		return(TRUE);
-	} else {
-		spec.disk_info.sector_size = getSectorSizeOfPhysDisk(file_name);
-		if (spec.disk_info.sector_size == 0) {
-			cerr << __FUNCTION__ << ": Failed to get sector size. Aborting " <<
-				"target.\n";
-			if (open_disk) {
-				Close(NULL);
-			}
-			return(FALSE);
-		}
-		size = getSizeOfPhysDisk(file_name);
-		alignment = 0;
-		sector_align_mask = ~((DWORDLONG)spec.disk_info.sector_size - 1);
-		ending_position = size;
-		offset = 0;
-		bytes_transferred = 0;
-		spec.disk_info.ready = TRUE;
-		if (open_disk) {
-			Close(NULL);
-		}
-		return(TRUE);
+
+	if (ioctl(fd, DKIOCGVTOC, &this_vtoc) < 0)
+	{
+		close(fd);
+		return(0);
 	}
+	//
+	// We have the vtoc.
+	// It contains the slice info (including size).
+	//
+	close(fd);
+	return((DWORDLONG)this_vtoc.v_part[part].p_size * this_vtoc.v_sectorsz);
 }
+#endif // SOLARIS
 
-
+#if defined(IOMTR_OS_LINUX)
 //
 // Get the sector size of a device. We do this by getting the address of the
 // kernel's device sector size table, then reading "/dev/kmem" to examine this
@@ -1781,3 +1841,8 @@
 }
 
 #endif
+#endif // UNIX
+
+
+
+
--- IOTargetDisk.h	Thu Oct 16 19:22:48 2003
+++ IOTargetDisk.h.mod	Wed Oct 15 19:55:07 2003
@@ -49,7 +49,10 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Replaced the [BIG|LITTLE]_ENDIAN_ARCH defines by    ## */
+/* ##                 IsBigEndian() function calls.                       ## */
+/* ##               2003-07-19 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Removed IOTime.h inclusion (now in IOCommon.h)      ## */
 /* ##               - Integrated the License Statement into this header.  ## */
 /* ##               - Added new header holding the changelog.             ## */
@@ -65,18 +68,21 @@
 #include "IOCQAIO.h"
 
 
-#ifdef UNIX
-#ifndef _LP64
-#define _LP64 /* to get at the 64 bit max long. */
-#define _LP64_DEFINED
-#endif /* _LP64 */
-#define MAX_DISK_SIZE	LONG_MAX
-#ifdef _LP64_DEFINED
-#undef _LP64
-#endif /* _LP64_DEFINED */
-#else /* WIN_NT default */
-#define MAX_DISK_SIZE	_I64_MAX
-#endif /* UNIX */
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #ifndef _LP64
+ #define _LP64 /* to get at the 64 bit max long. */
+ #define _LP64_DEFINED
+ #endif /* _LP64 */
+ #define MAX_DISK_SIZE	LONG_MAX
+ #ifdef _LP64_DEFINED
+ #undef _LP64
+ #endif /* _LP64_DEFINED */
+#elif defined(IOMTR_OSFAMILY_WINDOWS)
+ #define MAX_DISK_SIZE	_I64_MAX
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
+#endif
+
 #define MAX_PARTITIONS	26
 
 // File names used to access a given drive.
@@ -84,14 +90,16 @@
 #define PHYSICAL_DISK	"\\\\.\\PHYSICALDRIVE"
 #define TEST_FILE		"iobw.tst"
 
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 #define ERROR_DISK_FULL					ENOSPC
 #define SECTOR_SIZE						512
 
-#ifdef SOLARIS
-#define RAW_DEVICE_DIR					"/dev/rdsk"
-#elif defined(LINUX)
-#define RAW_DEVICE_DIR					"/dev"
+#if defined(IOMTR_OS_SOLARIS)
+ #define RAW_DEVICE_DIR					"/dev/rdsk"
+#elif defined(IOMTR_OS_LINUX)
+ #define RAW_DEVICE_DIR					"/dev"
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 
 #endif
@@ -109,14 +117,16 @@
 
 	BOOL		Initialize( Target_Spec *target_info, CQ *cq );
 
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	// Initialize logical disks (e.g. C:, D:, E:, etc.).
 	BOOL		Init_Logical( char drive );
 	// Initialize physical (system) disks (e.g. physicaldisk0, physicaldisk1, etc.).
 	BOOL		Init_Physical( int drive );
-#else // UNIX
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
 	BOOL		Init_Logical( char *drive );
 	BOOL		Init_Physical( char *drive );
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 
 	void		Set_Size( int maximum_size = 0 );
@@ -145,7 +155,7 @@
 	CQAIO		*io_cq;
 
 	HANDLE		disk_file;
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 	struct File		file_handle;
 #endif
 	DWORDLONG	size;					// Size of the disk in bytes.
@@ -157,7 +167,7 @@
 	DWORDLONG	ending_position;		// Last byte where transfers can occur.
 	DWORDLONG	offset;
 	DWORD		bytes_transferred;		// Number of bytes successfully transferred to the disk.
-#ifdef SOLARIS
+#if defined(IOMTR_OS_SOLARIS)
 	BOOL		Look_For_Partitions();	// private member function to look for partitions on disk.
 	DWORDLONG	Get_Partition_Size(char *, int);	// private member function to get the partition size.
 	DWORDLONG	Get_Slice_Size(char *, int);	// private member function to get the slice size.
--- IOTargetTCP.cpp	Thu Oct 16 19:22:49 2003
+++ IOTargetTCP.cpp.mod	Wed Oct 15 22:41:26 2003
@@ -1,46 +1,61 @@
-/*
-Intel Open Source License 
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOTargetTCP.cpp                                           ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Implementation of the Target class for TCP/IP sockets.## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTargetTCP.cpp: Implementation of the Target class for TCP/IP sockets.
-//
-//////////////////////////////////////////////////////////////////////
 
 #include "IOTargetTCP.h"
 
@@ -200,7 +215,7 @@
 		do 
 		{
 			result = tcp_socket.ConnectSocket( &tcp_socket.server_address );
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 			if ( result != ReturnSuccess )
 			{
 				// According to connect(3XN):
@@ -288,7 +303,7 @@
 	}
 	// If the I/O completed immediately or is deferred, the completion
 	// will still be pending in the completion queue.
-#if defined(UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
+#if defined(IOMTR_OSFAMILY_UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
 	// This prevents the code from looking in the completionQ for immediately completed IOs.
 	if (retval == ReturnSuccess)
 		return ReturnSuccess;
@@ -332,7 +347,7 @@
 	}
 	// If the I/O completed immediately or is deferred, the completion
 	// will still be pending in the completion queue.
-#if defined(UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
+#if defined(IOMTR_OSFAMILY_UNIX) && defined(IMMEDIATE_AIO_COMPLETION)
 	// This prevents the code from looking in the completionQ for immediately completed IOs.
 	if (retval == ReturnSuccess)
 		return ReturnSuccess;
--- IOTargetTCP.h	Thu Oct 16 19:22:49 2003
+++ IOTargetTCP.h.mod	Wed Oct 15 22:43:44 2003
@@ -1,50 +1,64 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTargetTCP.h: Interface for an implementation of the Target class
-// for TCP/IP sockets.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOTargetTCP.h                                             ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for an implementation of the Target class   ## */
+/* ##               for TCP/IP sockets.                                   ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef TCPTARGET_DEFINED
-	#define TCPTARGET_DEFINED
+#define TCPTARGET_DEFINED
+
 
 #include "IOCommon.h"
 #include "IOTarget.h"
--- IOTargetVI.cpp	Thu Oct 16 19:22:50 2003
+++ IOTargetVI.cpp.mod	Wed Oct 15 20:19:00 2003
@@ -1,47 +1,62 @@
-/*
-Intel Open Source License 
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOTargetVI.cpp                                            ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Implementation of the Target class for Virtual        ## */
+/* ##               Interface Architecture (VI) targets.                  ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTargetVI.cpp: Implementation of the Target class for Virtual Interface
-// Architecture (VI) targets.
-//
-//////////////////////////////////////////////////////////////////////
 
 #include "IOTargetVI.h"
 
@@ -86,10 +101,12 @@
 
 	// Release descriptor memory.
 	if ( descriptors )
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		VirtualFree( descriptors, 0, MEM_RELEASE );
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 		free(descriptors);
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 
 	// Close the VI NIC.
@@ -120,10 +137,12 @@
 
 	// First free the descriptors.
 	if ( descriptors )
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 		VirtualFree( descriptors, 0, MEM_RELEASE );
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 		free(descriptors);
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 
 	// Allocate enough descriptors to meet requested queue depth setting.
@@ -131,12 +150,14 @@
 	// control for each queue depth specified
 	descriptor_count = (target_info->vi_info.outstanding_ios + 1) * 
 		target_info->queue_depth + 2;
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	if ( !(descriptors = (VIP_DESCRIPTOR*) VirtualAlloc( NULL, descriptor_count * 
 		sizeof( VIP_DESCRIPTOR ), MEM_COMMIT, PAGE_READWRITE )) )
-#else
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
 	if ( !(descriptors = (VIP_DESCRIPTOR*) valloc( descriptor_count * 
 		sizeof( VIP_DESCRIPTOR ) )) )
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
 	{
 		// Could not allocate descriptors.  Signal failure.
--- IOTargetVI.h	Thu Oct 16 19:22:50 2003
+++ IOTargetVI.h.mod	Wed Oct 15 20:22:23 2003
@@ -1,48 +1,61 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTargetVI.h: Interface for an implementation of the Target class for
-// Virtual Interface Architecture (VI) targets.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOTargetVI.h                                              ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for an implementation of the Target class   ## */
+/* ##               for Virtual Interface Architecture (VI) targets.      ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	TARGETVI_DEFINED
 #define	TARGETVI_DEFINED
 
--- IOTest.h	Thu Oct 16 19:25:31 2003
+++ IOTest.h.mod	Wed Oct 15 22:59:22 2003
@@ -1,61 +1,71 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOMessage.h: Common include file for Dynamo and Iometer, defining data
-// structures used to describe a test.
-//
-// If you make any changes to this file, you need to change Iometer/Dynamo's 
-// version number and make corresponding changes in ByteOrder.cpp.
-//
-// This file is used by both Iometer and Dynamo.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  (Iometer & Dynamo) / IOTest.h                                      ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Common include file for Dynamo and Iometer, defining  ## */
+/* ##               data structures used to describe a test.              ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: - If you make any changes to this file, you need to   ## */
+/* ##                 change Iometer/Dynamo's version number and make     ## */
+/* ##                 corresponding changes in ByteOrder.cpp.             ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef TEST_SPEC_DEFINED
 #define TEST_SPEC_DEFINED
 
 
 
 #include "IOAccess.h"
-#ifdef UNIX
-#include "IOCommon.h"
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #include "IOCommon.h"
 #endif
 #include "vipl.h"
 
--- IOTransfers.h	Thu Oct 16 19:25:31 2003
+++ IOTransfers.h.mod	Wed Oct 15 23:01:22 2003
@@ -1,56 +1,68 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOTransfers.h: Include file defining data structures used to define a 
-// "transaction" (one or more related I/O operations) in Dynamo.
-//
-// This file is used by both Iometer and Dynamo.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  (Iometer & Dynamo) / IOTransfers.h                                 ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Include file defining data structures used to define  ## */
+/* ##               a "transaction" (one or more related I/O operations)  ## */
+/* ##               in Dynamo.                                            ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef IO_TRANSFERS_DEFINED
 #define IO_TRANSFERS_DEFINED
 
 
-#ifdef UNIX
-#include "IOCommon.h"
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #include "IOCommon.h"
 #endif
 #include "vipl.h"
 
--- IOVIPL.cpp	Thu Oct 16 19:25:32 2003
+++ IOVIPL.cpp.mod	Wed Oct 15 22:11:22 2003
@@ -1,59 +1,76 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOVIPL.cpp: Implementation of the VIPL class, which provides an interface
-// to the Virtual Interface Programmer's Library (hiding the dynamic linking
-// to vipl.dll).  All members of this class are static, so in effect there
-// is at most one VIPL object in a copy of Dynamo, even though there may be
-// multiple instantiations of it.
-//
-//////////////////////////////////////////////////////////////////////
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOVIPL.cpp                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Implementation of the VIPL class, which provides an   ## */
+/* ##               interface to the Virtual Interface Programmer's       ## */
+/* ##               Library (hiding the dynamic linking to vipl.dll). All ## */
+/* ##               members of this class are static, so in effect there  ## */
+/* ##               is at most one VIPL object in a copy of Dynamo, even  ## */
+/* ##               though there may be multiple instantiations of it.    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 
 
 #include "IOVIPL.h"
 
-#if defined (_WIN32) || defined (_WIN64)
-#include <iostream>
-using namespace std;
-#else /* !WIN32 || _WIN64 */
-#include <iostream.h>
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include <iostream>
+ using namespace std;
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
+ #include <iostream.h>
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 
 
@@ -152,7 +169,7 @@
 //
 VIPL::VIPL()
 {
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	// Load vipl.dll.
 	if ( !(vipl_dll = LoadLibrary( "vipl.dll" )) )
 	{
@@ -238,9 +255,8 @@
 		GetProcAddress( vipl_dll, "VipNSGetHostByAddr" );
 	VipNSShutdown = (fVipNSShutdown)
 		GetProcAddress( vipl_dll, "VipNSShutdown" );
-#else // It's UNIX
+#elif defined(IOMTR_OS_SOLARIS)
 	// When VI library becomes available on Solaris, this should work
-#ifdef SOLARIS
 	if ( (vipl_dll = dlopen( "vipl.so", RTLD_NOW|RTLD_GLOBAL|RTLD_PARENT )) == NULL )
 	{
 		#ifdef _DEBUG
@@ -324,12 +340,11 @@
 		dlsym( vipl_dll, "VipNSGetHostByAddr" );
 	VipNSShutdown = (fVipNSShutdown)
 		dlsym( vipl_dll, "VipNSShutdown" );
-
-#else // ! SOLARIS (different UNIX)
-	THE COMPILER SHOULD NOT HAVE COME HERE (VI code).
-#endif // SOLARIS
+#elif defined(IOMTR_OS_LINUX)
+ // nop
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
-
 }
 
 
@@ -339,18 +354,18 @@
 //
 VIPL::~VIPL()
 {
-#if defined (_WIN32) || defined (_WIN64)
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
 	// If library had previously been loaded, free it.
 	if ( vipl_dll )
 		FreeLibrary( vipl_dll );
-#else // UNIX
-#ifdef SOLARIS
+#elif defined(IOMTR_OS_SOLARIS)
 	if ( vipl_dll )
 		dlclose( vipl_dll );
 	return;
-#else // !SOLARIS (different UNIX)
-	THE COMPILER SHOULD NOT HAVE COME HERE (VI code).
-#endif // SOLARIS
+#elif defined(IOMTR_OS_LINUX)
+ // nop
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 }
 
--- IOVIPL.h	Thu Oct 16 19:25:32 2003
+++ IOVIPL.h.mod	Wed Oct 15 22:17:41 2003
@@ -1,60 +1,77 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOVIPL.h: Interface for the VIPL class, which provides an interface
-// to the Virtual Interface Programmer's Library.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / IOVIPL.h                                                  ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the VIPL class, which provides an       ## */
+/* ##               interface to the Virtual Interface Programmer's       ## */
+/* ##               Library.                                              ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	VIPL_DEFINED
 #define	VIPL_DEFINED
 
-#ifdef UNIX
-#define HINSTANCE HANDLE
+
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #define HINSTANCE HANDLE
 #endif
 
-#if defined (_WIN32) || defined (_WIN64)
-#include <afxwin.h>
-#else // UNIX
-#include "IOCommon.h"
-#include <dlfcn.h>
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include <afxwin.h>
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
+ #include "IOCommon.h"
+ #include <dlfcn.h>
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
 #endif
 #include "vipl.h"
 
--- IOVersion.h	Thu Oct 16 19:25:33 2003
+++ IOVersion.h.mod	Wed Oct 15 20:55:43 2003
@@ -9,11 +9,51 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
 /* ##  Remarks ...: <none>                                                ## */
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-05-10 (daniel.scheibli@edelbyte.org)             ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               2003-05-10 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Changed the version to current date.                ## */
 /* ##               2003-03-05 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Dropped not used defines like IOVER_FILE,           ## */
@@ -23,61 +63,15 @@
 /* ##               - Changed the version to current date.                ## */
 /* ##               2003-02-08 (daniel.scheibli@edelbyte.org)             ## */
 /* ##               - Changed the version to current date.                ## */
+/* ##               - Added new header holding the changelog.             ## */
 /* ##                                                                     ## */
 /* ######################################################################### */
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1999-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// IOVersion.h: Iometer VersionInfo resource value definition file
-// (included in .RC2 file).
-//
-// This file is used by both Iometer and Dynamo.
-//
-//////////////////////////////////////////////////////////////////////
-/* ######################################################################### */
-
 #ifndef _IOVERSION
 #define _IOVERSION
 
-#ifndef UNIX
-#include <winver.h>
+
+#if defined(IOMTR_OSFAMILY_UNIX)
+ #include <winver.h>
 #endif /* !UNIX */
 
 
@@ -113,25 +107,28 @@
 
 
 
-#ifndef UNIX
+#if defined(IOMTR_OSFAMILY_WINDOWS)
 
-#define IOVER_LEGALCOPYRIGHT				"Copyright © 1996-2001 Intel Corporation\0"
-//#define IOVER_LEGALTRADEMARKS			"??? Iometer is a Trademark of Intel Corporation\0"
-#define IOVER_LEGALTRADEMARKS				"\0"
-#define IOVER_COMPANYNAME					"Intel Corporation\0"
+#define IOVER_LEGALCOPYRIGHT			"Copyright © 1996-2001 Intel Corporation\0"
+#define IOVER_LEGALTRADEMARKS			"\0"
+#define IOVER_COMPANYNAME			"Intel Corporation\0"
 
 #ifdef _DEBUG
-#if defined (_WIN64)
-#define IOVER_PRODUCT_NAME			"Iometer 64-bit (DEBUG)\0"
-#else
-#define IOVER_PRODUCT_NAME			"Iometer (DEBUG)\0"
-#endif // _WIN64
-#else
-#if defined (_WIN64)
-#define IOVER_PRODUCT_NAME			"Iometer 64-bit\0"
-#else
-#define IOVER_PRODUCT_NAME			"Iometer\0"
-#endif // _WIN64
+ #if defined(IOMTR_OS_WIN64)
+  #define IOVER_PRODUCT_NAME			"Iometer 64-bit (DEBUG)\0"
+ #elif defined(IOMTR_OS_WIN32)
+  #define IOVER_PRODUCT_NAME			"Iometer (DEBUG)\0"
+ #else
+  #warning ===> WARNING: You have to do some coding here to get the port done! 
+ #endif
+#else
+ #if defined(IOMTR_OS_WIN64)
+  #define IOVER_PRODUCT_NAME			"Iometer 64-bit\0"
+ #elif defined(IOMTR_OS_WIN32)
+  #define IOVER_PRODUCT_NAME			"Iometer\0"
+ #else
+  #warning ===> WARNING: You have to do some coding here to get the port done! 
+ #endif
 #endif // _DEBUG
 
 ////////
@@ -140,34 +137,41 @@
 ////////
 
 #if defined(_GALILEO_)
-#define IOVER_FILETYPE				VFT_APP
-#define IOVER_INTERNAL_NAME			"Galileo\0"
+#define IOVER_FILETYPE			VFT_APP
+#define IOVER_INTERNAL_NAME		"Galileo\0"
 #define IOVER_ORIGINAL_FILE_NAME	"Iometer.exe\0"
-#if defined (_WIN64)
-#define IOVER_FILE_DESCRIPTION		"Iometer Control/GUI (64-bit)\0"
+#if defined(IOMTR_OS_WIN64)
+ #define IOVER_FILE_DESCRIPTION		"Iometer Control/GUI (64-bit)\0"
+#elif defined(IOMTR_OS_WIN32)
+ #define IOVER_FILE_DESCRIPTION		"Iometer Control/GUI\0"
 #else
-#define IOVER_FILE_DESCRIPTION		"Iometer Control/GUI\0"
-#endif // _WIN64
-#define IOVER_COMMENTS				"\0"
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
+#endif
+#define IOVER_COMMENTS			"\0"
 #endif
 
 #if defined(_PULSAR_)
-#define IOVER_FILETYPE				VFT_APP
-#define IOVER_INTERNAL_NAME			"Pulsar\0"
+#define IOVER_FILETYPE			VFT_APP
+#define IOVER_INTERNAL_NAME		"Pulsar\0"
 #define IOVER_ORIGINAL_FILE_NAME	"Dynamo.exe\0"
-#if defined (_WIN64)
-#define IOVER_FILE_DESCRIPTION		"Iometer Workload Generator (64-bit)\0"
+#if defined(IOMTR_OS_WIN64)
+ #define IOVER_FILE_DESCRIPTION		"Iometer Workload Generator (64-bit)\0"
+#elif defined(IOMTR_OS_WIN32)
+ #define IOVER_FILE_DESCRIPTION		"Iometer Workload Generator\0"
 #else
-#define IOVER_FILE_DESCRIPTION		"Iometer Workload Generator\0"
-#endif // _WIN64
-#define IOVER_COMMENTS				"\0"
+ #warning ===> WARNING: You have to do some coding here to get the port done! 
+#endif
+#define IOVER_COMMENTS			"\0"
 #endif
 
-#endif /* !UNIX */
+#endif
 
 
 #if defined (__cplusplus)
 }
 #endif
 
+
 #endif // _IOVERSION
+
+
--- LegalBox.h	Thu Oct 16 19:25:34 2003
+++ LegalBox.h.mod	Wed Oct 15 19:45:55 2003
@@ -1,47 +1,63 @@
-/*
-Intel Open Source License 
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Iometer / LegalBox.h                                               ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the CLegalBox class, which is           ## */
+/* ##               responsible for the "Intel Software License           ## */
+/* ##               Agreement" dialog.                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Replaced the [BIG|LITTLE]_ENDIAN_ARCH defines by    ## */
+/* ##                 IsBigEndian() function calls.                       ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// LegalBox.h: Interface for the CLegalBox class, which is
-// responsible for the "Intel Software License Agreement" dialog.
-//
-//////////////////////////////////////////////////////////////////////
 
 #ifndef LEGALBOX_DEFINED
 #define LEGALBOX_DEFINED
--- NetTCP.cpp	Thu Oct 16 19:25:35 2003
+++ NetTCP.cpp.mod	Wed Oct 15 19:52:33 2003
@@ -559,7 +559,7 @@
 	socklen_t addr_len = sizeof( address );
 
 	fd_set		readfds;
-#ifdef UNIX
+#if defined(IOMTR_OSFAMILY_UNIX)
 	struct File    *fp = (struct File *)client_socket;
 #endif
 
--- NetVI.cpp	Thu Oct 16 19:25:35 2003
+++ NetVI.cpp.mod	Wed Oct 15 19:40:18 2003
@@ -1,51 +1,63 @@
-/*
-Intel Open Source License 
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / NetVI.cpp                                                 ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Implements the NetVI class for communication between  ## */
+/* ##               network workers using the VI technology.              ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Replaced the [BIG|LITTLE]_ENDIAN_ARCH defines by    ## */
+/* ##                 IsBigEndian() function calls.                       ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
+
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// NetVI.cpp: Implementation of the Network class for Virtual Interface
-// Architecture (VI) connections.
-//
-// Network objects are used for connections between network workers
-// in Dynamo (contrast Port, which is used for communication between
-// Dynamo and Iometer).
-//
-//////////////////////////////////////////////////////////////////////
 
 #define VI_DETAILS 0 // Set to 1 to enable additional debug messages.
 
@@ -53,12 +65,15 @@
 
 #include "NetVI.h"
 
-#if defined (_WIN32) || defined (_WIN64)
-#include <iostream>
-using namespace std;
-#else /* !WIN32 || _WIN64 */
-#include <iostream.h>
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include <iostream>
+ using namespace std;
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS) 
+ #include <iostream.h>
+#else
+ #warning ===> WARNING: You have to do some coding here to get the port done!
 #endif
+
 
 
 //
--- NetVI.h	Thu Oct 16 19:25:36 2003
+++ NetVI.h.mod	Wed Oct 15 19:57:55 2003
@@ -1,52 +1,60 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// NetVI.h: Interface for an implementation of the Network class for
-// Virtual Interface Architecture (VI) connections.
-//
-// Network objects are used for connections between network workers
-// in Dynamo (contrast Port, which is used for communication between
-// Dynamo and Iometer).
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / NetVI.h                                                   ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Class definition for the NetVI class.                 ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	NETVI_DEFINED
 #define	NETVI_DEFINED
 
--- VINic.cpp	Thu Oct 16 19:25:36 2003
+++ VINic.cpp.mod	Wed Oct 15 22:24:15 2003
@@ -1,60 +1,73 @@
-/*
-Intel Open Source License 
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / VINic.cpp                                                 ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Implements the VINic class, which abstracts the VI    ## */
+/* ##               NIC hardware interface.                               ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: - Note that applications should verify that vipl.dll  ## */
+/* ##                 is loaded before using this class.                  ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// VINic.cpp: Implements the VINic class, which abstracts the VI NIC 
-// hardware interface.
-// 
-// Note that applications should verify that vipl.dll is loaded before using 
-// this class.
-//
-///////////////////////////////////////////////////////////////////////////////
 
 #define VINIC_DETAILS 0  // Set to 1 for additional debugging messages.
 
 #include "VINic.h"
 
-#if defined (_WIN32) || defined (_WIN64)
-#include <iostream>
-using namespace std;
-#else /* !WIN32 || _WIN64 */
-#include <iostream.h>
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+ #include <iostream>
+ using namespace std;
+#elif defined(IOMTR_OS_LINUX) || defined(IOMTR_OS_SOLARIS)
+ #include <iostream.h>
 #endif
 
 
--- VINic.h	Thu Oct 16 19:25:36 2003
+++ VINic.h.mod	Wed Oct 15 22:26:59 2003
@@ -1,51 +1,62 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// VINic.h: Interface for the VINic class, which abstracts the VI NIC 
-// hardware interface.
-// 
-// Note that applications should verify that vipl.dll is loaded before using 
-// this class.
-//
-///////////////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / VINic.h                                                   ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Interface for the VINic class, which abstracts the    ## */
+/* ##               VI NIC hardware interface.                            ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: - Note that applications should verify that vipl.dll  ## */
+/* ##                 is loaded before using this class.                  ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	VINIC_DEFINED
 #define	VINIC_DEFINED
 
--- ostream64.h	Thu Oct 16 19:25:36 2003
+++ ostream64.h.mod	Fri Oct 17 21:25:07 2003
@@ -1,67 +1,90 @@
-/*
-Intel Open Source License 
-
-Copyright (c) 2001 Intel Corporation 
-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 the Intel Corporation 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 INTEL OR ITS  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.
-
-*/
-// ==========================================================================
-//                Copyright (C) 1997-2000 Intel Corporation
-//                          All rights reserved                               
-//                INTEL CORPORATION PROPRIETARY INFORMATION                   
-//    This software is supplied under the terms of a license agreement or     
-//    nondisclosure agreement with Intel Corporation and may not be copied    
-//    or disclosed except in accordance with the terms of that agreement.     
-// ==========================================================================
-//
-// ostream64.h: Extends the standard "ostream" class to provide input and
-// output of 64-bit integers.
-//
-//////////////////////////////////////////////////////////////////////
-
+/* ######################################################################### */
+/* ##                                                                     ## */
+/* ##  Dynamo / ostream64.h                                               ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Job .......: Extends the standard "ostream" class to provide input ## */
+/* ##               and output of 64-bit integers.                        ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Intel Open Source License                                          ## */
+/* ##                                                                     ## */
+/* ##  Copyright (c) 2001 Intel Corporation                               ## */
+/* ##  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 the Intel Corporation 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 INTEL OR ITS  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.                                                    ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Remarks ...: <none>                                                ## */
+/* ##                                                                     ## */
+/* ## ------------------------------------------------------------------- ## */
+/* ##                                                                     ## */
+/* ##  Changes ...: 2003-10-15 (daniel.scheibli@edelbyte.org)             ## */
+/* ##               - Tried to cleanup the realy confusing #ifdef's at    ## */
+/* ##                 the beginning of the file.                          ## */
+/* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
+/* ##                 global defines.                                     ## */
+/* ##               - Integrated the License Statement into this header.  ## */
+/* ##               - Added new header holding the changelog.             ## */
+/* ##                                                                     ## */
+/* ######################################################################### */
 #ifndef	OSTREAM64_DEFINED
 #define OSTREAM64_DEFINED
 
-// Uncomment if the workaround is needed.  This was needed prior to Win64 2239 IDW SDK
-// and is needed as of latest Win32 SDK
-#ifdef _WIN64
-//#define WORKAROUND_FOR_INT64_OFSTREAM
-#else // WIN32
-#ifdef WORKAROUND_FOR_INT64_OFSTREAM
+
+
+// Uncomment if the workaround is needed. This
+// - was needed prior to Win64 2239 IDW SDK and
+// - is needed as of latest Win32 SDK
+#if defined(IOMTR_OS_WIN32)
+ //#define WORKAROUND_FOR_INT64_OFSTREAM
+#endif
+#if defined(IOMTR_OS_WIN64)
+ //#define WORKAROUND_FOR_INT64_OFSTREAM
 #endif
+// I tried to reproduce what the compiler did with the old
+// code. It still doesn't make sense to me, but for the moment
+// we stay with the logic we got from the original developer.
+#if ( defined(IOMTR_OS_WIN32) &&  defined(WORKAROUND_FOR_INT64_OFSTREAM) ) || \
+    ( defined(IOMTR_OS_WIN64) && !defined(WORKAROUND_FOR_INT64_OFSTREAM) ) || \
+    ( defined(IOMTR_OS_WIN64) &&  defined(WORKAROUND_FOR_INT64_OFSTREAM) )
 
 #include <stdio.h>
-
 #include <ostream>
 using namespace std;
 
 #define INT64_DIGITS	21
 
-
 //
 // Extension to ostream to permit int64.
 //
@@ -83,6 +106,8 @@
     return( s << buf );
 }
 
-
 #endif
-#endif
\ No newline at end of file
+
+
+
+
