]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: remove any system specific code of ecore
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 9 Apr 2016 10:43:22 +0000 (12:43 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 9 Apr 2016 11:01:56 +0000 (13:01 +0200)
This was causing issues with certain builds and
was not used for the purpose of testing.

tests/suite/ecore/src/include/eina_file.h
tests/suite/ecore/src/lib/eina_cpu.c

index 40fb4c4adf5d906f64e92c014c9e6510301b1254..b30bf9682b1d50c2c5963573e6dd5cc46b5b5adf 100644 (file)
@@ -51,6 +51,10 @@ typedef struct _Eina_File_Direct_Info Eina_File_Direct_Info;
 typedef void (*Eina_File_Dir_List_Cb) (const char *name, const char *path,
                                       void *data);
 
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 256
+#endif
+
 /**
  * @struct _Eina_File_Direct_Info
  * A structure to store informations of a path.
@@ -62,7 +66,7 @@ struct _Eina_File_Direct_Info {
                       /**< size of the filename/basename component */
        size_t name_start;
                      /**< where the filename/basename component starts */
-       char path[PATH_MAX];
+       char path[_POSIX_PATH_MAX];
                        /**< the path */
        const struct dirent *dirent;
                                /**< the dirent structure of the path */
index ab8686fa2d9c6ff54989bd1cace02d0332632095..bb99f7d8e8e11d06117bf66d60fb67b495cde43c 100644 (file)
 *============================================================================*/
 
 /* FIXME this ifdefs should be replaced */
-#if defined(__i386__) || defined(__x86_64__)
-/* We save ebx and restore it to be PIC compatible */
-static inline void _x86_cpuid(int op, int *a, int *b, int *c, int *d)
-{
-       asm volatile (
-#if defined(__x86_64__)
-                            "pushq %%rbx      \n\t"    /* save %ebx */
-#else
-                            "pushl %%ebx      \n\t"    /* save %ebx */
-#endif
-                            "cpuid            \n\t" "movl %%ebx, %1   \n\t"    /* save what cpuid just put in %ebx */
-#if defined(__x86_64__)
-                            "popq %%rbx       \n\t"    /* restore the old %ebx */
-#else
-                            "popl %%ebx       \n\t"    /* restore the old %ebx */
-#endif
-                            :"=a" (*a), "=r"(*b), "=c"(*c), "=d"(*d)
-                            :"a"(op)
-                            :"cc");
-}
-
-static
-void _x86_simd(Eina_Cpu_Features * features)
-{
-       int a, b, c, d;
-
-       _x86_cpuid(1, &a, &b, &c, &d);
-       /*
-        * edx
-        * 18 = PN (Processor Number)
-        * 19 = CLFlush (Cache Line Flush)
-        * 23 = MMX
-        * 25 = SSE
-        * 26 = SSE2
-        * 28 = HTT (Hyper Threading)
-        * ecx
-        * 0 = SSE3
-        */
-       if ((d >> 23) & 1)
-               *features |= EINA_CPU_MMX;
-
-       if ((d >> 25) & 1)
-               *features |= EINA_CPU_SSE;
-
-       if ((d >> 26) & 1)
-               *features |= EINA_CPU_SSE2;
-
-       if (c & 1)
-               *features |= EINA_CPU_SSE3;
-}
-#endif
 
 /*============================================================================*
 *                                 Global                                     *
@@ -124,9 +73,6 @@ void _x86_simd(Eina_Cpu_Features * features)
 EAPI Eina_Cpu_Features eina_cpu_features_get(void)
 {
        Eina_Cpu_Features ecf = 0;
-#if defined(__i386__) || defined(__x86_64__)
-       _x86_simd(&ecf);
-#endif
        return ecf;
 }