summaryrefslogtreecommitdiff
path: root/src/generic
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/generic
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/generic')
-rw-r--r--src/generic/evas/raw/main.c6
-rw-r--r--src/generic/evas/xcf/main.c7
-rw-r--r--src/generic/evas/xcf/meson.build4
3 files changed, 5 insertions, 12 deletions
diff --git a/src/generic/evas/raw/main.c b/src/generic/evas/raw/main.c
index 275815b3cb..70a1625b75 100644
--- a/src/generic/evas/raw/main.c
+++ b/src/generic/evas/raw/main.c
@@ -11,10 +11,6 @@
11#include "shmfile.h" 11#include "shmfile.h"
12#include "timeout.h" 12#include "timeout.h"
13 13
14#ifdef HAVE_NETINET_IN_H
15# include <netinet/in.h>
16#endif
17
18#ifdef HAVE_UNISTD_H 14#ifdef HAVE_UNISTD_H
19# include <unistd.h> 15# include <unistd.h>
20#endif 16#endif
@@ -142,7 +138,7 @@ read_raw_data()
142 if (image->colors != 3) 138 if (image->colors != 3)
143 goto clean_image; 139 goto clean_image;
144#define SWAP(a, b) { a ^= b; a = (b ^=a); } 140#define SWAP(a, b) { a ^= b; a = (b ^=a); }
145 if ((image->bits == 16) && (htons(0x55aa) != 0x55aa)) 141 if ((image->bits == 16) && (eina_htons(0x55aa) != 0x55aa))
146 for (count = 0; count < image->data_size; count +=2) 142 for (count = 0; count < image->data_size; count +=2)
147 SWAP(image->data[count], image->data[count + 1]); 143 SWAP(image->data[count], image->data[count + 1]);
148#undef SWAP 144#undef SWAP
diff --git a/src/generic/evas/xcf/main.c b/src/generic/evas/xcf/main.c
index c5ef6a82d6..65e5e1b5b3 100644
--- a/src/generic/evas/xcf/main.c
+++ b/src/generic/evas/xcf/main.c
@@ -45,14 +45,11 @@
45 Ok, hope this helps with understanding XCF. -- cK. 45 Ok, hope this helps with understanding XCF. -- cK.
46 46
47*/ 47*/
48#include <Eina.h>
48#include "common.h" 49#include "common.h"
49#include "shmfile.h" 50#include "shmfile.h"
50#include "timeout.h" 51#include "timeout.h"
51 52
52#ifdef _WIN32
53# include <winsock2.h> /* for ntohl() */
54#endif
55
56#define FREE(X) { free(X); X = NULL; } 53#define FREE(X) { free(X); X = NULL; }
57 54
58#define TILE_WIDTH 64 55#define TILE_WIDTH 64
@@ -479,7 +476,7 @@ xcf_read_int32(void *fp,
479 xcf_read_int8(fp, (DATA8*) data, count * 4); 476 xcf_read_int8(fp, (DATA8*) data, count * 4);
480 while (count--) 477 while (count--)
481 { 478 {
482 *data = (DATA32)ntohl(*data); 479 *data = (DATA32)eina_ntohl(*data);
483 data++; 480 data++;
484 } 481 }
485 } 482 }
diff --git a/src/generic/evas/xcf/meson.build b/src/generic/evas/xcf/meson.build
index 0f5fb208c5..169469b679 100644
--- a/src/generic/evas/xcf/meson.build
+++ b/src/generic/evas/xcf/meson.build
@@ -4,5 +4,5 @@ generic_src = files([
4 'pixelfuncs.c' 4 'pixelfuncs.c'
5]) 5])
6 6
7generic_deps = [dependency('zlib')] 7generic_deps = [eina, dependency('zlib')]
8generic_support = ['xcf.gz'] \ No newline at end of file 8generic_support = ['xcf.gz']