summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-05-08 08:39:36 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-08 08:39:36 -0400
commitb141c42e3f932c4b935df2a13ef55d4e7f66a726 (patch)
tree9d1e1d0b0e7917e9c6b6d6499c2792468694d3fa
parenta4c44e5e744dba15dfe512668127906afd4b6dba (diff)
Evil: remove wrapper around getcwd()
Summary: getcwd() is declared in direct.h Test Plan: compilation Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8858
-rw-r--r--src/bin/elementary/run.c4
-rw-r--r--src/lib/efreet/efreet_desktop_command.c1
-rw-r--r--src/lib/eina/eina_prefix.c1
-rw-r--r--src/lib/elementary/elm_main.c1
-rw-r--r--src/lib/evil/evil_macro_wrapper.h10
-rw-r--r--src/lib/evil/evil_unistd.c11
-rw-r--r--src/lib/evil/evil_unistd.h21
-rw-r--r--src/modules/emotion/gstreamer/emotion_gstreamer.c4
-rw-r--r--src/tests/efreet/ef_desktop.c4
9 files changed, 15 insertions, 42 deletions
diff --git a/src/bin/elementary/run.c b/src/bin/elementary/run.c
index 41f666f..261935f 100644
--- a/src/bin/elementary/run.c
+++ b/src/bin/elementary/run.c
@@ -17,6 +17,10 @@
17# include <alloca.h> 17# include <alloca.h>
18#endif 18#endif
19 19
20#ifdef _WIN32
21# include <direct.h> /* getcwd */
22#endif
23
20#ifdef HAVE_ENVIRON 24#ifdef HAVE_ENVIRON
21extern char **environ; 25extern char **environ;
22#endif 26#endif
diff --git a/src/lib/efreet/efreet_desktop_command.c b/src/lib/efreet/efreet_desktop_command.c
index 8c99102..26ac9ac 100644
--- a/src/lib/efreet/efreet_desktop_command.c
+++ b/src/lib/efreet/efreet_desktop_command.c
@@ -6,6 +6,7 @@
6#include <ctype.h> 6#include <ctype.h>
7 7
8#ifdef _WIN32 8#ifdef _WIN32
9# include <direct.h> /* getcwd */
9# include <winsock2.h> 10# include <winsock2.h>
10#endif 11#endif
11 12
diff --git a/src/lib/eina/eina_prefix.c b/src/lib/eina/eina_prefix.c
index 51ec9b3..aeac22f 100644
--- a/src/lib/eina/eina_prefix.c
+++ b/src/lib/eina/eina_prefix.c
@@ -42,6 +42,7 @@
42#endif 42#endif
43 43
44#ifdef _WIN32 44#ifdef _WIN32
45# include <direct.h> /* getcwd */
45# include <Evil.h> 46# include <Evil.h>
46#endif 47#endif
47 48
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index f343836..4bb77ac 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -11,6 +11,7 @@
11#endif 11#endif
12 12
13#ifdef _WIN32 13#ifdef _WIN32
14# include <direct.h> /* getcwd */
14# include <Evil.h> 15# include <Evil.h>
15#endif 16#endif
16 17
diff --git a/src/lib/evil/evil_macro_wrapper.h b/src/lib/evil/evil_macro_wrapper.h
index 9eb1ac7..cd650e5 100644
--- a/src/lib/evil/evil_macro_wrapper.h
+++ b/src/lib/evil/evil_macro_wrapper.h
@@ -50,16 +50,6 @@
50 */ 50 */
51 51
52/** 52/**
53 * @def getcwd(b,s)
54 *
55 * Wrapper around evil_getcwd().
56 */
57#ifdef getcwd
58# undef getcwd
59#endif
60#define getcwd(b,s) evil_getcwd((b),(s))
61
62/**
63 * @def pipe(fds) 53 * @def pipe(fds)
64 * 54 *
65 * Wrapper around evil_pipe(). 55 * Wrapper around evil_pipe().
diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c
index 27f6825..765c7aa 100644
--- a/src/lib/evil/evil_unistd.c
+++ b/src/lib/evil/evil_unistd.c
@@ -62,17 +62,6 @@ evil_time_get(void)
62 return (double)_evil_time_second + (double)(count.QuadPart - _evil_time_count)/ (double)_evil_time_freq; 62 return (double)_evil_time_second + (double)(count.QuadPart - _evil_time_count)/ (double)_evil_time_freq;
63} 63}
64 64
65/*
66 * File related functions
67 *
68 */
69
70char *
71evil_getcwd(char *buffer, size_t size)
72{
73 return _getcwd(buffer, (int)size);
74}
75
76 65
77/* 66/*
78 * Sockets and pipe related functions 67 * Sockets and pipe related functions
diff --git a/src/lib/evil/evil_unistd.h b/src/lib/evil/evil_unistd.h
index 5319c47..a227e14 100644
--- a/src/lib/evil/evil_unistd.h
+++ b/src/lib/evil/evil_unistd.h
@@ -36,27 +36,6 @@
36 */ 36 */
37EAPI double evil_time_get(void); 37EAPI double evil_time_get(void);
38 38
39
40/*
41 * file related functions
42 *
43 */
44
45/**
46 * @brief Get the current directory.
47 *
48 * @param buffer Buffer to store the current directory.
49 * @param size Size of the buffer.
50 * @return The current directory.
51 *
52 * Use the _getcwd function in MSVCRT.
53 *
54 * Conformity: Almost POSIX.1 (no errno set)
55 *
56 * Supported OS: Windows XP.
57 */
58EAPI char *evil_getcwd(char *buffer, size_t size);
59
60/* 39/*
61 * Sockets and pipe related functions 40 * Sockets and pipe related functions
62 * 41 *
diff --git a/src/modules/emotion/gstreamer/emotion_gstreamer.c b/src/modules/emotion/gstreamer/emotion_gstreamer.c
index 9719515..b37f5ce 100644
--- a/src/modules/emotion/gstreamer/emotion_gstreamer.c
+++ b/src/modules/emotion/gstreamer/emotion_gstreamer.c
@@ -5,6 +5,10 @@
5#include <unistd.h> 5#include <unistd.h>
6#include <fcntl.h> 6#include <fcntl.h>
7 7
8#ifdef _WIN32
9# include <direct.h> /* getcwd */
10#endif
11
8#include <Eina.h> 12#include <Eina.h>
9#include <Evas.h> 13#include <Evas.h>
10#include <Ecore.h> 14#include <Ecore.h>
diff --git a/src/tests/efreet/ef_desktop.c b/src/tests/efreet/ef_desktop.c
index 78ee87e..86e45bd 100644
--- a/src/tests/efreet/ef_desktop.c
+++ b/src/tests/efreet/ef_desktop.c
@@ -8,6 +8,10 @@
8#include <unistd.h> 8#include <unistd.h>
9#include <limits.h> 9#include <limits.h>
10 10
11#ifdef _WIN32
12# include <direct.h> /* getcwd */
13#endif
14
11#include <Efreet.h> 15#include <Efreet.h>
12 16
13#include "ef_test.h" 17#include "ef_test.h"