aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2014-06-09 17:30:08 +0200
committerAnders Broman <a.broman58@gmail.com>2014-06-09 15:31:45 +0000
commit8e8a4ceba30f2034c74d1542f3f04eaffa79979e (patch)
treeb5622406f3b292c76f894b26a24993b2d876b4a1 /wsutil
parent9dbf2ff28e1fe9e88e90ae1cefaf5295cbf1287f (diff)
Try to fix the builds.
Change-Id: I3ccb5c1b40504cd9314da5a09b225e3e2bf991b8 Reviewed-on: https://code.wireshark.org/review/2073 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/Makefile.common4
-rw-r--r--wsutil/ws_mempbrk.c9
-rw-r--r--wsutil/ws_mempbrk.h36
-rw-r--r--wsutil/ws_mempbrk_sse42.c7
4 files changed, 46 insertions, 10 deletions
diff --git a/wsutil/Makefile.common b/wsutil/Makefile.common
index dc8c2a538d..c1af0e0313 100644
--- a/wsutil/Makefile.common
+++ b/wsutil/Makefile.common
@@ -104,7 +104,9 @@ LIBWSUTIL_INCLUDES = \
type_util.h \
u3.h \
unicode-utils.h \
- ws_cpuid.h
+ ws_cpuid.h \
+ ws_mempbrk.h \
+
#
# Editor modelines - http://www.wireshark.org/tools/modelines.html
diff --git a/wsutil/ws_mempbrk.c b/wsutil/ws_mempbrk.c
index bde8452f8b..9a01433bb7 100644
--- a/wsutil/ws_mempbrk.c
+++ b/wsutil/ws_mempbrk.c
@@ -24,12 +24,7 @@
#include <glib.h>
#include "ws_symbol_export.h"
#include "ws_cpuid.h"
-
-#ifdef HAVE_SSE42
-extern const char *_ws_mempbrk_sse42(const char* haystack, size_t haystacklen, const char *needles);
-#endif
-
-const guint8 *_ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles);
+#include "ws_mempbrk.h"
const guint8 *
_ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles)
@@ -56,7 +51,7 @@ ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles)
#ifdef HAVE_SSE42
guint32 CPUInfo[4];
guint32 bSSE42Extensions;
- /*const int has_sse42 = 1;*/ /* XXX, use CPUID */
+
#endif
if (*needles == 0)
return NULL;
diff --git a/wsutil/ws_mempbrk.h b/wsutil/ws_mempbrk.h
new file mode 100644
index 0000000000..16c774f129
--- /dev/null
+++ b/wsutil/ws_mempbrk.h
@@ -0,0 +1,36 @@
+/* ws_mempbrk.h
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __WS_MEMPBRK_H__
+#define __WS_MEMPBRK_H__
+
+#include "ws_symbol_export.h"
+
+WS_DLL_PUBLIC const guint8 *ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles);
+
+#ifdef HAVE_SSE42
+const char *_ws_mempbrk_sse42(const char* haystack, size_t haystacklen, const char *needles);
+#endif
+
+const guint8 *_ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles);
+
+
+#endif /* __WS_MEMPBRK_H__ */ \ No newline at end of file
diff --git a/wsutil/ws_mempbrk_sse42.c b/wsutil/ws_mempbrk_sse42.c
index 47474e5e6b..a64e0ab7a4 100644
--- a/wsutil/ws_mempbrk_sse42.c
+++ b/wsutil/ws_mempbrk_sse42.c
@@ -28,9 +28,10 @@
#include <nmmintrin.h>
#include <string.h>
+#include "ws_mempbrk.h"
+
+#ifdef HAVE_SSE42
-extern const guint8 *_ws_mempbrk(const guint8* haystack, size_t haystacklen, const guint8 *needles);
-const char *_ws_mempbrk_sse42(const char* haystack, size_t haystacklen, const char *needles);
/* Helper for variable shifts of SSE registers.
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -186,3 +187,5 @@ _ws_mempbrk_sse42(const char *s, size_t slen, const char *a)
/* XXX, use mempbrk_slow here? */
return _ws_mempbrk(aligned, slen, a);
}
+
+#endif /* HAVE_SSE42 */