zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b141c42e3f932c4b935df2a13ef55d4e7f66a726

commit b141c42e3f932c4b935df2a13ef55d4e7f66a726
Author: Vincent Torri <[email protected]>
Date:   Wed May 8 08:39:36 2019 -0400

    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
---
 src/bin/elementary/run.c                          |  4 ++++
 src/lib/efreet/efreet_desktop_command.c           |  1 +
 src/lib/eina/eina_prefix.c                        |  1 +
 src/lib/elementary/elm_main.c                     |  1 +
 src/lib/evil/evil_macro_wrapper.h                 | 10 ----------
 src/lib/evil/evil_unistd.c                        | 11 -----------
 src/lib/evil/evil_unistd.h                        | 21 ---------------------
 src/modules/emotion/gstreamer/emotion_gstreamer.c |  4 ++++
 src/tests/efreet/ef_desktop.c                     |  4 ++++
 9 files changed, 15 insertions(+), 42 deletions(-)

diff --git a/src/bin/elementary/run.c b/src/bin/elementary/run.c
index 41f666f373..261935f41f 100644
--- a/src/bin/elementary/run.c
+++ b/src/bin/elementary/run.c
@@ -17,6 +17,10 @@
 # include <alloca.h>
 #endif
 
+#ifdef _WIN32
+# include <direct.h> /* getcwd */
+#endif
+
 #ifdef HAVE_ENVIRON
 extern char **environ;
 #endif
diff --git a/src/lib/efreet/efreet_desktop_command.c 
b/src/lib/efreet/efreet_desktop_command.c
index 8c99102c3d..26ac9aca2f 100644
--- a/src/lib/efreet/efreet_desktop_command.c
+++ b/src/lib/efreet/efreet_desktop_command.c
@@ -6,6 +6,7 @@
 #include <ctype.h>
 
 #ifdef _WIN32
+# include <direct.h> /* getcwd */
 # include <winsock2.h>
 #endif
 
diff --git a/src/lib/eina/eina_prefix.c b/src/lib/eina/eina_prefix.c
index 51ec9b3136..aeac22f4b7 100644
--- a/src/lib/eina/eina_prefix.c
+++ b/src/lib/eina/eina_prefix.c
@@ -42,6 +42,7 @@
 #endif
 
 #ifdef _WIN32
+# include <direct.h> /* getcwd */
 # include <Evil.h>
 #endif
 
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index f3438364e3..4bb77acf45 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -11,6 +11,7 @@
 #endif
 
 #ifdef _WIN32
+# include <direct.h> /* getcwd */
 # include <Evil.h>
 #endif
 
diff --git a/src/lib/evil/evil_macro_wrapper.h 
b/src/lib/evil/evil_macro_wrapper.h
index 9eb1ac7a6e..cd650e5e12 100644
--- a/src/lib/evil/evil_macro_wrapper.h
+++ b/src/lib/evil/evil_macro_wrapper.h
@@ -49,16 +49,6 @@
  * evil_unistd.h
  */
 
-/**
- * @def getcwd(b,s)
- *
- * Wrapper around evil_getcwd().
- */
-#ifdef getcwd
-# undef getcwd
-#endif
-#define getcwd(b,s) evil_getcwd((b),(s))
-
 /**
  * @def pipe(fds)
  *
diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c
index 27f682581b..765c7aa34f 100644
--- a/src/lib/evil/evil_unistd.c
+++ b/src/lib/evil/evil_unistd.c
@@ -62,17 +62,6 @@ evil_time_get(void)
    return (double)_evil_time_second + (double)(count.QuadPart - 
_evil_time_count)/ (double)_evil_time_freq;
 }
 
-/*
- * File related functions
- *
- */
-
-char *
-evil_getcwd(char *buffer, size_t size)
-{
-   return _getcwd(buffer, (int)size);
-}
-
 
 /*
  * Sockets and pipe related functions
diff --git a/src/lib/evil/evil_unistd.h b/src/lib/evil/evil_unistd.h
index 5319c474f3..a227e14fc2 100644
--- a/src/lib/evil/evil_unistd.h
+++ b/src/lib/evil/evil_unistd.h
@@ -36,27 +36,6 @@
  */
 EAPI double evil_time_get(void);
 
-
-/*
- * file related functions
- *
- */
-
-/**
- * @brief Get the current directory.
- *
- * @param buffer Buffer to store the current directory.
- * @param size Size of the buffer.
- * @return The current directory.
- *
- * Use the _getcwd function in MSVCRT.
- *
- * Conformity: Almost POSIX.1 (no errno set)
- *
- * Supported OS: Windows XP.
- */
-EAPI char *evil_getcwd(char *buffer, size_t size);
-
 /*
  * Sockets and pipe related functions
  *
diff --git a/src/modules/emotion/gstreamer/emotion_gstreamer.c 
b/src/modules/emotion/gstreamer/emotion_gstreamer.c
index 97195151db..b37f5ce639 100644
--- a/src/modules/emotion/gstreamer/emotion_gstreamer.c
+++ b/src/modules/emotion/gstreamer/emotion_gstreamer.c
@@ -5,6 +5,10 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#ifdef _WIN32
+# include <direct.h> /* getcwd */
+#endif
+
 #include <Eina.h>
 #include <Evas.h>
 #include <Ecore.h>
diff --git a/src/tests/efreet/ef_desktop.c b/src/tests/efreet/ef_desktop.c
index 78ee87e191..86e45bd503 100644
--- a/src/tests/efreet/ef_desktop.c
+++ b/src/tests/efreet/ef_desktop.c
@@ -8,6 +8,10 @@
 #include <unistd.h>
 #include <limits.h>
 
+#ifdef _WIN32
+# include <direct.h> /* getcwd */
+#endif
+
 #include <Efreet.h>
 
 #include "ef_test.h"

-- 


Reply via email to