summaryrefslogtreecommitdiff
path: root/src/lib/efreet
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-02-01 11:04:17 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-02-01 14:25:35 +0000
commitf7c560c311d0ba0da94346e17c8b20f40a0ed152 (patch)
treeaf5f63aceb78ff1b153f3727f8adab6ee4e1d653 /src/lib/efreet
parent36286a23fe97e3667c1106116d1edbc301c7a9ba (diff)
replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows Test Plan: execution of edje_cc Reviewers: cedric, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7834
Diffstat (limited to 'src/lib/efreet')
-rw-r--r--src/lib/efreet/efreet_mime.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c
index 68767dcec0..e4e1ba896f 100644
--- a/src/lib/efreet/efreet_mime.c
+++ b/src/lib/efreet/efreet_mime.c
@@ -9,18 +9,6 @@
9#include <sys/mman.h> 9#include <sys/mman.h>
10#include <fnmatch.h> 10#include <fnmatch.h>
11 11
12#ifdef HAVE_NETINET_IN_H
13# include <netinet/in.h>
14#endif
15
16#ifdef HAVE_ARPA_INET_H
17# include <arpa/inet.h>
18#endif
19
20#ifdef _WIN32
21# include <winsock2.h>
22#endif
23
24#include <Ecore.h> 12#include <Ecore.h>
25#include <Ecore_File.h> 13#include <Ecore_File.h>
26 14
@@ -1018,7 +1006,7 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
1018 1006
1019 tshort = 0; 1007 tshort = 0;
1020 memcpy(&tshort, ptr, sizeof(short)); 1008 memcpy(&tshort, ptr, sizeof(short));
1021 entry->value_len = ntohs(tshort); 1009 entry->value_len = eina_ntohs(tshort);
1022 ptr += 2; 1010 ptr += 2;
1023 1011
1024 entry->value = NEW(char, entry->value_len); 1012 entry->value = NEW(char, entry->value_len);
@@ -1059,20 +1047,20 @@ efreet_mime_shared_mimeinfo_magic_parse(char *data, int size)
1059 if (entry->word_size == 2) 1047 if (entry->word_size == 2)
1060 { 1048 {
1061 ((short*)entry->value)[j] = 1049 ((short*)entry->value)[j] =
1062 ntohs(((short*)entry->value)[j]); 1050 eina_ntohs(((short*)entry->value)[j]);
1063 1051
1064 if (entry->mask) 1052 if (entry->mask)
1065 ((short*)entry->mask)[j] = 1053 ((short*)entry->mask)[j] =
1066 ntohs(((short*)entry->mask)[j]); 1054 eina_ntohs(((short*)entry->mask)[j]);
1067 } 1055 }
1068 else if (entry->word_size == 4) 1056 else if (entry->word_size == 4)
1069 { 1057 {
1070 ((int*)entry->value)[j] = 1058 ((int*)entry->value)[j] =
1071 ntohl(((int*)entry->value)[j]); 1059 eina_ntohl(((int*)entry->value)[j]);
1072 1060
1073 if (entry->mask) 1061 if (entry->mask)
1074 ((int*)entry->mask)[j] = 1062 ((int*)entry->mask)[j] =
1075 ntohl(((int*)entry->mask)[j]); 1063 eina_ntohl(((int*)entry->mask)[j]);
1076 } 1064 }
1077 } 1065 }
1078 } 1066 }