Changeset: 9f4ebc4a97a0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f4ebc4a97a0
Added Files:
        clients/mapiclient/mprompt.h
        clients/mapiclient/prompt.c
Removed Files:
        common/utils/mprompt.h
        common/utils/prompt.c
Modified Files:
        clients/Tests/exports.stable.out
        clients/mapiclient/CMakeLists.txt
        common/utils/CMakeLists.txt
        common/utils/mutils.h
Branch: cmake-fun
Log Message:

Moved mprompt.h to mcutil, so the symbols don't have to be exported.

All symbols from mprompt are used in mapi client executables which mcutil 
statically links to.

The print_trace symbol is not defined, so remove it.


diffs (65 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -459,7 +459,6 @@ void mo_print_options(opt *set, int setl
 int mo_system_config(opt **Set, int setlen);
 const oid oid_nil;
 DIR *opendir(const char *dirname);
-void print_trace(void);
 ssize_t ptrFromStr(const char *src, size_t *len, ptr **dst, bool external);
 ssize_t ptrToStr(str *dst, size_t *len, const ptr *src, bool external);
 const ptr ptr_nil;
diff --git a/clients/mapiclient/CMakeLists.txt 
b/clients/mapiclient/CMakeLists.txt
--- a/clients/mapiclient/CMakeLists.txt
+++ b/clients/mapiclient/CMakeLists.txt
@@ -63,7 +63,7 @@ endif()
 
 include_directories(../mapilib ../../common/options ../../common/stream 
../../common/utils ${ICONV_INCLUDE_DIR})
 
-add_library(mcutil STATIC dump.c dotmonetdb.c dotmonetdb.h eventparser.c 
eventparser.h)
+add_library(mcutil STATIC dump.c dotmonetdb.c dotmonetdb.h eventparser.c 
eventparser.h mprompt.h prompt.c)
 
 add_executable(mclient mclient.c ReadlineTools.c ReadlineTools.h mhelp.c 
mhelp.h)
 target_link_libraries(mclient PRIVATE mcutil mutils mcrypt moptions mapi 
stream ${READLINE_LIBRARIES}
diff --git a/common/utils/mprompt.h b/clients/mapiclient/mprompt.h
rename from common/utils/mprompt.h
rename to clients/mapiclient/mprompt.h
--- a/common/utils/mprompt.h
+++ b/clients/mapiclient/mprompt.h
@@ -6,7 +6,5 @@
  * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V.
  */
 
-#include "mutils.h"
-
-mutils_export char *prompt_getlogin(void);
-mutils_export char *simple_prompt(const char *prompt, int maxlen, int echo, 
const char *def);
+extern char *prompt_getlogin(void);
+extern char *simple_prompt(const char *prompt, int maxlen, int echo, const 
char *def);
diff --git a/common/utils/prompt.c b/clients/mapiclient/prompt.c
rename from common/utils/prompt.c
rename to clients/mapiclient/prompt.c
diff --git a/common/utils/CMakeLists.txt b/common/utils/CMakeLists.txt
--- a/common/utils/CMakeLists.txt
+++ b/common/utils/CMakeLists.txt
@@ -8,7 +8,7 @@
 
 include_directories(${UUID_INCLUDE_DIR} ${CRYPTO_INCLUDE_DIR})
 
-set(MUTILS_OBJECTS mutils.h mutils.c prompt.c mprompt.h revision.c)
+set(MUTILS_OBJECTS mutils.h mutils.c revision.c)
 set(MCRYPT_OBJECTS mcrypt.h mcrypt.c)
 set(MSABAOTH_OBJECTS muuid.h muuid.c msabaoth.h msabaoth.c)
 
diff --git a/common/utils/mutils.h b/common/utils/mutils.h
--- a/common/utils/mutils.h
+++ b/common/utils/mutils.h
@@ -67,8 +67,6 @@ mutils_export char *dirname(char *path);
 
 mutils_export int MT_lockf(char *filename, int mode, off_t off, off_t len);
 
-mutils_export void print_trace(void);
-
 /* Retrieves the absolute path to the executable being run, with no
  * extra /, /./, or /../ sequences.  On Darwin and Solaris this function
  * needs to be called before any chdirs are performed.  Returns a
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to