$OpenBSD: patch-provider_libserver_StreamUtil_cpp,v 1.1 2010/06/30 02:46:48 ajacoutot Exp $
--- provider/libserver/StreamUtil.cpp.orig	Tue Jun 29 01:35:22 2010
+++ provider/libserver/StreamUtil.cpp	Tue Jun 29 01:25:44 2010
@@ -265,7 +265,9 @@ ECRESULT SerializeDatabasePropVal(DB_ROW lpRow, DB_LEN
 	unsigned int ulKind;
 	unsigned int ulNameId;
 	std::string strNameString;
+#ifndef __OpenBSD__
 	locale_t loc = createlocale(LC_NUMERIC, "C");
+#endif
 
 	short i;
 	unsigned int ul;
@@ -301,7 +303,11 @@ ECRESULT SerializeDatabasePropVal(DB_ROW lpRow, DB_LEN
 			er = ZARAFA_E_NOT_FOUND;
 			goto exit;
 		}
+#ifndef __OpenBSD__
 		flt = (float)strtod_l(lpRow[FIELD_NR_DOUBLE], NULL, loc);
+#else
+		flt = (float)strtod(lpRow[FIELD_NR_DOUBLE], NULL);
+#endif
 		er = lpSink->Write(&flt, sizeof(flt), 1);
 		break;
 	case PT_BOOLEAN:
@@ -318,7 +324,11 @@ ECRESULT SerializeDatabasePropVal(DB_ROW lpRow, DB_LEN
 			er = ZARAFA_E_NOT_FOUND;
 			goto exit;
 		}
+#ifndef __OpenBSD__
 		dbl = strtod_l(lpRow[FIELD_NR_DOUBLE], NULL, loc);
+#else
+		dbl = strtod(lpRow[FIELD_NR_DOUBLE], NULL);
+#endif
 		er = lpSink->Write(&dbl, sizeof(dbl), 1);
 		break;
 	case PT_CURRENCY:
@@ -407,7 +417,11 @@ ECRESULT SerializeDatabasePropVal(DB_ROW lpRow, DB_LEN
 		for (unsigned x = 0; er == erSuccess && x < ulCount; x++)
 		{
 			ParseMVProp(lpRow[FIELD_NR_DOUBLE], lpLen[FIELD_NR_DOUBLE], &ulLastPos, &strData);
+#ifndef __OpenBSD__
 			flt = (float)strtod_l(strData.c_str(), NULL, loc);
+#else
+			flt = (float)strtod(strData.c_str(), NULL);
+#endif
 			er = lpSink->Write(&flt, sizeof(flt), 1);
 		}
 		break;
@@ -424,7 +438,11 @@ ECRESULT SerializeDatabasePropVal(DB_ROW lpRow, DB_LEN
 		for (unsigned x = 0; er == erSuccess && x < ulCount; x++)
 		{
 			ParseMVProp(lpRow[FIELD_NR_DOUBLE], lpLen[FIELD_NR_DOUBLE], &ulLastPos, &strData);
+#ifndef __OpenBSD__
 			dbl = strtod_l(strData.c_str(), NULL, loc);
+#else
+			dbl = strtod(strData.c_str(), NULL);
+#endif
 			er = lpSink->Write(&dbl, sizeof(flt), 1);
 		}
 		break;
@@ -534,7 +552,9 @@ ECRESULT SerializeDatabasePropVal(DB_ROW lpRow, DB_LEN
 	}
 
 exit:
+#ifndef __OpenBSD__
 	freelocale(loc);
+#endif
 	return er;
 }
 
