summaryrefslogtreecommitdiff
path: root/sal/qa/osl/socket/sockethelper.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/osl/socket/sockethelper.hxx')
-rw-r--r--sal/qa/osl/socket/sockethelper.hxx43
1 files changed, 23 insertions, 20 deletions
diff --git a/sal/qa/osl/socket/sockethelper.hxx b/sal/qa/osl/socket/sockethelper.hxx
index 184059774..77553bda3 100644
--- a/sal/qa/osl/socket/sockethelper.hxx
+++ b/sal/qa/osl/socket/sockethelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,35 +25,23 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
#ifndef _SOCKETHELPER_HXX_
#define _SOCKETHELPER_HXX_
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
#include <sal/types.h>
#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
#include <rtl/ustring.h>
-#ifndef _OSL_SOCLET_HXX_
#include <osl/socket.hxx>
-#endif
#include <osl/socket.h>
-#ifndef _OSL_THREAD_HXX
#include <osl/thread.hxx>
-#endif
-#ifndef _OSL_FILE_HXX
#include <osl/file.hxx>
-#endif
-#ifndef _OSL_MUTEX_HXX
#include <osl/mutex.hxx>
-#endif
#include <osl/time.h>
#ifdef __cplusplus
@@ -63,7 +52,7 @@ extern "C"
//------------------------------------------------------------------------
// OS dependent declaration and includes
//------------------------------------------------------------------------
-#if ( defined UNX ) || ( defined OS2 ) //Unix
+#if ( defined UNX ) //Unix
#include <unistd.h>
#include <limits.h>
@@ -77,7 +66,7 @@ extern "C"
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
-#include <netinet/in.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#endif
@@ -85,22 +74,34 @@ extern "C"
#ifndef _OSL_SOCKET_CONST_H_
#if ( defined WNT ) // Windows
-#include <tools/prewin.h>
-// #include <windows.h>
#include <winsock.h>
#include <string.h>
-#include <tools/postwin.h>
#endif
#endif
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-
#ifdef __cplusplus
}
#endif
+/** test output if SILENT_TEST is 0
+*/
+#if OSL_DEBUG_LEVEL > 0
+# define SILENT_TEST 0
+#else
+# define SILENT_TEST 1
+#endif
+
+#if SILENT_TEST
+# define t_print(...) { }
+#else
+# define t_print printf
+#endif
+
+/** convert UString and OUString to std::string
+*/
+#define STD_STRING(s) (std::string((const char *)s.getStr()))
+
/** compare two OUString.
*/
sal_Bool compareUString( const ::rtl::OUString & ustr1, const ::rtl::OUString & ustr2 );
@@ -163,3 +164,5 @@ class CloseSocketThread : public Thread
*/
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */