[ofa-general] PATCH[6/6] Windows port of libibmad - dirs, src/Sources, src/ibmad_export.def, src/ibmad_exports.src, ibmad_main.cpp
Davis, Arlin R
arlin.r.davis at intel.com
Thu Dec 18 15:38:55 PST 2008
6/6 - new files for windows: dirs, src/Sources, src/ibmad_export.def, src/ibmad_exports.src, ibmad_main.cpp
Signed-off by: Arlin Davis <ardavis at ichips.intel.com>
diff -Naur libibmad-1.2.2/dirs libibmad/dirs
--- libibmad-1.2.2/dirs 1969-12-31 16:00:00.000000000 -0800
+++ libibmad/dirs 2008-07-08 10:28:28.000000000 -0700
@@ -0,0 +1,2 @@
+DIRS = \
+ src
\ No newline at end of file
diff -Naur libibmad-1.2.2/src/ibmad_export.def libibmad/src/ibmad_export.def
--- libibmad-1.2.2/src/ibmad_export.def 1969-12-31 16:00:00.000000000 -0800
+++ libibmad/src/ibmad_export.def 2008-11-21 11:21:22.000000000 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2008 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under the OpenIB.org BSD license
+ * below:
+ *
+ * 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.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+LIBRARY LIBIBMAD.DLL
+
+EXPORTS
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
diff -Naur libibmad-1.2.2/src/ibmad_exports.src libibmad/src/ibmad_exports.src
--- libibmad-1.2.2/src/ibmad_exports.src 1969-12-31 16:00:00.000000000 -0800
+++ libibmad/src/ibmad_exports.src 2008-12-12 16:53:52.000000000 -0800
@@ -0,0 +1,54 @@
+#if DBG
+LIBRARY libibmadd.dll
+#else
+LIBRARY libibmad.dll
+#endif
+
+#ifndef _WIN64
+EXPORTS
+ mad_set_field;
+ mad_get_field;
+ mad_set_array;
+ mad_get_array;
+ mad_set_field64;
+ mad_get_field64;
+ mad_decode_field;
+ mad_encode_field;
+ mad_encode;
+ mad_trid;
+ mad_build_pkt;
+ mad_register_port_client;
+ mad_register_client;
+ mad_register_server;
+ mad_class_agent;
+ mad_agent_class;
+ mad_send;
+ mad_receive;
+ mad_respond;
+ mad_alloc;
+ mad_free;
+ madrpc_portid;
+ madrpc_init;
+ madrpc_set_retries;
+ madrpc_set_timeout;
+ madrpc_show_errors;
+ smp_query;
+ smp_set;
+ ib_vendor_call;
+ ib_path_query;
+ ib_resolve_smlid;
+ ib_resolve_guid;
+ ib_resolve_portid_str;
+ ib_resolve_self;
+ perf_classportinfo_query;
+ port_performance_query;
+ port_performance_reset;
+ port_performance_ext_query;
+ port_performance_ext_reset;
+ port_samples_control_query;
+ port_samples_result_query;
+ portid2str;
+ portid2portnum;
+ str2drpath;
+ drpath2str;
+#endif
diff -Naur libibmad-1.2.2/src/ibmad_main.cpp libibmad/src/ibmad_main.cpp
--- libibmad-1.2.2/src/ibmad_main.cpp 1969-12-31 16:00:00.000000000 -0800
+++ libibmad/src/ibmad_main.cpp 2008-07-08 10:28:28.000000000 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2008 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under the OpenIB.org BSD license
+ * below:
+ *
+ * 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.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <windows.h>
+
+BOOLEAN WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+ UNREFERENCED_PARAMETER(hInstance);
+ UNREFERENCED_PARAMETER(dwReason);
+ UNREFERENCED_PARAMETER(lpReserved);
+
+ return TRUE;
+}
diff -Naur libibmad-1.2.2/src/Sources libibmad/src/Sources
--- libibmad-1.2.2/src/Sources 1969-12-31 16:00:00.000000000 -0800
+++ libibmad/src/Sources 2008-12-03 09:59:42.000000000 -0800
@@ -0,0 +1,47 @@
+!if $(FREEBUILD)
+TARGETNAME = libibmad
+!else
+TARGETNAME = libibmadd
+!endif
+
+TARGETPATH = ..\..\..\bin\user\obj$(BUILD_ALT_DIR)
+TARGETTYPE = DYNLINK
+
+DLLDEF = $(OBJ_PATH)\$O\ibmad_exports.def
+
+DLLENTRY = DllMain
+USE_MSVCRT=1
+
+SOURCES = \
+ ibmad_main.cpp \
+ dump.c \
+ fields.c \
+ gs.c \
+ mad.c \
+ portid.c \
+ register.c \
+ resolve.c \
+ rpc.c \
+ sa.c \
+ serv.c \
+ smp.c \
+ vendor.c
+
+INCLUDES = ..\include\infiniband;..\..\libibverbs\include;..\..\libibumad\include;..\..\..\inc;..\..\..\inc\user;
+
+USER_C_FLAGS = $(USER_C_FLAGS) -DEXPORT_IBMAD_SYMBOLS
+
+TARGETLIBS = \
+ $(SDK_LIB_PATH)\kernel32.lib \
+ $(SDK_LIB_PATH)\uuid.lib \
+ $(SDK_LIB_PATH)\ws2_32.lib \
+ $(SDK_LIB_PATH)\advapi32.lib \
+ $(SDK_LIB_PATH)\user32.lib \
+ $(SDK_LIB_PATH)\ole32.lib \
+!if $(FREEBUILD)
+ $(TARGETPATH)\*\complib.lib \
+ $(TARGETPATH)\*\libibumad.lib
+!else
+ $(TARGETPATH)\*\complibd.lib \
+ $(TARGETPATH)\*\libibumadd.lib
+!endif
More information about the general
mailing list