$OpenBSD: patch-common_mapi_ptr_mapi_object_ptr_h,v 1.3 2011/05/19 17:18:18 ajacoutot Exp $

On OpenBSD, _P and _U are defined in ctype.h.

--- common/mapi_ptr/mapi_object_ptr.h.orig	Thu May 19 17:01:33 2011
+++ common/mapi_ptr/mapi_object_ptr.h	Thu May 19 18:30:36 2011
@@ -170,13 +170,13 @@ class mapi_object_ptr (public)
 		std::swap(m_lpObject, other.m_lpObject);
 	}
 	
-	template<typename _U>
-	HRESULT QueryInterface(_U &refResult) {
+	template<typename _ZCPU>
+	HRESULT QueryInterface(_ZCPU &refResult) {
 		HRESULT		hr = MAPI_E_NOT_INITIALIZED;
-		typename _U::pointer	lpNewObject = NULL;
+		typename _ZCPU::pointer	lpNewObject = NULL;
 		
 		if (m_lpObject) {
-			hr = m_lpObject->QueryInterface(_U::iid, (void**)&lpNewObject);
+			hr = m_lpObject->QueryInterface(_ZCPU::iid, (void**)&lpNewObject);
 			if (hr == hrSuccess)
 				refResult = lpNewObject;
 
@@ -198,7 +198,7 @@ class mapi_object_ptr (public)
 				if (HrGetOneProp(m_lpObject, PR_EC_OBJECT, &ptrPropValue) != hrSuccess)
 					goto exit;	// hr is still MAPI_E_INTERFACE_NOT_SUPPORTED
 
-				hr = ((IECUnknown*)ptrPropValue->Value.lpszA)->QueryInterface(_U::iid, (void**)&lpNewObject);
+				hr = ((IECUnknown*)ptrPropValue->Value.lpszA)->QueryInterface(_ZCPU::iid, (void**)&lpNewObject);
 				if (hr == hrSuccess)
 					refResult = lpNewObject;
 			}
@@ -229,9 +229,9 @@ class mapi_object_ptr (public)
 		return m_lpObject == NULL;
 	}
 
-	template<typename _P>
-	_P as() {
-		_P ptrTmp;
+	template<typename _ZCPP>
+	_ZCPP as() {
+		_ZCPP ptrTmp;
 		QueryInterface(ptrTmp);
 		return ptrTmp;
 	}
