[ofw] [PATCH] libibverbs: remove _errno include from verbs.h

Hefty, Sean sean.hefty at intel.com
Mon Jul 12 15:04:02 PDT 2010


verbs.h is intended to be included directly by applications.  Since
_errno.h is a linux header file abstraction, move its use internal
to libibverbs.  This avoids issues if the user includes errno.h
directly and matches the use on Linux.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
 .../infiniband-diags/include/windows/config.h      |    3 +--
 trunk/ulp/dapl2/dapl/ibal/SOURCES                  |    2 +-
 .../ulp/dapl2/dapl/openib_cma/windows/openib_osd.h |    4 ----
 trunk/ulp/dapl2/dapl/udapl/windows/dapl_osd.h      |    1 +
 trunk/ulp/dapl2/dat/udat/SOURCES                   |    2 +-
 trunk/ulp/dapl2/dat/udat/windows/dat_osd.h         |    1 +
 trunk/ulp/libibumad/src/umad.cpp                   |    1 +
 trunk/ulp/libibverbs/include/infiniband/verbs.h    |    1 -
 trunk/ulp/libibverbs/src/ibverbs.h                 |    2 ++
 trunk/ulp/librdmacm/src/cma.cpp                    |    1 +
 10 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/trunk/tools/infiniband-diags/include/windows/config.h b/trunk/tools/infiniband-diags/include/windows/config.h
index e5d7c13..c6365bf 100644
--- a/trunk/tools/infiniband-diags/include/windows/config.h
+++ b/trunk/tools/infiniband-diags/include/windows/config.h
@@ -34,8 +34,7 @@
 #ifndef _CONFIG_H_
 #define _CONFIG_H_
 
-#include <../../../../ulp/libibverbs/include/infiniband/verbs.h>
-
+#include <_errno.h>
 #include <_string.h>
 
 #endif /* _CONFIG_H_ */
diff --git a/trunk/ulp/dapl2/dapl/ibal/SOURCES b/trunk/ulp/dapl2/dapl/ibal/SOURCES
index b8c9932..bb1d792 100644
--- a/trunk/ulp/dapl2/dapl/ibal/SOURCES
+++ b/trunk/ulp/dapl2/dapl/ibal/SOURCES
@@ -28,7 +28,7 @@ SOURCES=udapl.rc			\
 
 INCLUDES = ..\include;..\common;..\..\dat\include;\
 		   ..\..\dat\udat\windows;..\udapl\windows;\
-		   ..\..\..\..\inc;..\..\..\..\inc\user;
+		   ..\..\..\..\inc;..\..\..\..\inc\user;..\..\..\..\inc\user\linux;
 
 DAPL_OPTS = -DEXPORT_DAPL_SYMBOLS -D_VENDOR_IBAL_ -DDAPL_MERGE_CM_DTO\
 			-DDAT_EXTENSIONS
diff --git a/trunk/ulp/dapl2/dapl/openib_cma/windows/openib_osd.h b/trunk/ulp/dapl2/dapl/openib_cma/windows/openib_osd.h
index 3290081..ac392b0 100644
--- a/trunk/ulp/dapl2/dapl/openib_cma/windows/openib_osd.h
+++ b/trunk/ulp/dapl2/dapl/openib_cma/windows/openib_osd.h
@@ -4,7 +4,3 @@
 
 #define ntohll _byteswap_uint64
 #define htonll _byteswap_uint64
-
-#ifndef EADDRNOTAVAIL
-#define EADDRNOTAVAIL	WSAEADDRNOTAVAIL
-#endif
diff --git a/trunk/ulp/dapl2/dapl/udapl/windows/dapl_osd.h b/trunk/ulp/dapl2/dapl/udapl/windows/dapl_osd.h
index 5fb9363..4b9ecbf 100644
--- a/trunk/ulp/dapl2/dapl/udapl/windows/dapl_osd.h
+++ b/trunk/ulp/dapl2/dapl/udapl/windows/dapl_osd.h
@@ -50,6 +50,7 @@
 
 #include <stddef.h>
 #include <complib/cl_types.h>
+#include <_errno.h>
 #pragma warning ( push, 3 )
 #include <winioctl.h>
 #include <stdio.h>
diff --git a/trunk/ulp/dapl2/dat/udat/SOURCES b/trunk/ulp/dapl2/dat/udat/SOURCES
index 7d37f65..4cddf72 100644
--- a/trunk/ulp/dapl2/dat/udat/SOURCES
+++ b/trunk/ulp/dapl2/dat/udat/SOURCES
@@ -19,7 +19,7 @@ SOURCES=udat.rc			\
 	udat_sr_parser.c	\
 	udat_sources.c
 
-INCLUDES=windows;..\common;..\include;
+INCLUDES=windows;..\common;..\include;..\..\..\..\inc\user\linux;
 RCOPTIONS=/I..\..\..\..\inc;
 
 # FIX ME!!! XXX specifically the 4113 warning prior to testing.
diff --git a/trunk/ulp/dapl2/dat/udat/windows/dat_osd.h b/trunk/ulp/dapl2/dat/udat/windows/dat_osd.h
index 6941e46..e661ba3 100644
--- a/trunk/ulp/dapl2/dat/udat/windows/dat_osd.h
+++ b/trunk/ulp/dapl2/dat/udat/windows/dat_osd.h
@@ -57,6 +57,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
+#include <_errno.h>
 
 #ifndef STATIC
 #define STATIC static
diff --git a/trunk/ulp/libibumad/src/umad.cpp b/trunk/ulp/libibumad/src/umad.cpp
index d666d1c..3f4f13c 100644
--- a/trunk/ulp/libibumad/src/umad.cpp
+++ b/trunk/ulp/libibumad/src/umad.cpp
@@ -38,6 +38,7 @@
 #include <infiniband/umad.h>
 #include <infiniband/verbs.h>
 #include <rdma/wvstatus.h>
+#include <_errno.h>
 #include "ibumad.h"
 
 #define IB_OPENIB_OUI                 (0x001405)
diff --git a/trunk/ulp/libibverbs/include/infiniband/verbs.h b/trunk/ulp/libibverbs/include/infiniband/verbs.h
index 82cebde..f1a6a7d 100644
--- a/trunk/ulp/libibverbs/include/infiniband/verbs.h
+++ b/trunk/ulp/libibverbs/include/infiniband/verbs.h
@@ -37,7 +37,6 @@
 
 #include <windows.h>
 #include <rdma\winverbs.h>
-#include <_errno.h>
 #include <comp_channel.h>
 
 #ifdef __cplusplus
diff --git a/trunk/ulp/libibverbs/src/ibverbs.h b/trunk/ulp/libibverbs/src/ibverbs.h
index 11458ef..63eb968 100644
--- a/trunk/ulp/libibverbs/src/ibverbs.h
+++ b/trunk/ulp/libibverbs/src/ibverbs.h
@@ -30,6 +30,8 @@
 #ifndef IB_VERBS_H
 #define IB_VERBS_H
 
+#include <_errno.h>
+
 extern COMP_MANAGER comp_mgr;
 extern HANDLE heap;
 
diff --git a/trunk/ulp/librdmacm/src/cma.cpp b/trunk/ulp/librdmacm/src/cma.cpp
index 53bf25f..1a96059 100644
--- a/trunk/ulp/librdmacm/src/cma.cpp
+++ b/trunk/ulp/librdmacm/src/cma.cpp
@@ -34,6 +34,7 @@
 
 #include <rdma/rdma_cma.h>
 #include <infiniband/verbs.h>
+#include <_errno.h>
 #include <comp_channel.h>
 #include <iba/ibat.h>
 #include "cma.h"




More information about the ofw mailing list