unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] compat: expose canonicalize_file_name to C++
@ 2021-04-17  0:18 Đoàn Trần Công Danh
  2021-04-17 12:13 ` David Bremner
  2021-04-24  0:57 ` [PATCH v3] compat: rename {,notmuch_}canonicalize_file_name Đoàn Trần Công Danh
  0 siblings, 2 replies; 16+ messages in thread
From: Đoàn Trần Công Danh @ 2021-04-17  0:18 UTC (permalink / raw)
  To: notmuch; +Cc: Đoàn Trần Công Danh

When compat canonicalize_file_name was introduced, it was limited to
C code only because it was used by C code only during that time.

From 5ec6fd4d, (lib/open: check for split configuration when creating
database., 2021-02-16), lib/open.cc, which is C++, relies on the
existent of canonicalize_file_name.

Let's remove the language restriction to support those platforms don't
have canonicalize_file_name(3).
---
 compat/compat.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/compat/compat.h b/compat/compat.h
index 8f15e585..e418e62c 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -38,12 +38,9 @@ extern "C" {
 #endif
 
 #if ! HAVE_CANONICALIZE_FILE_NAME
-/* we only call this function from C, and this makes testing easier */
-#ifndef __cplusplus
 char *
 canonicalize_file_name (const char *path);
 #endif
-#endif
 
 #if ! HAVE_GETLINE
 #include <stdio.h>
-- 
2.31.1.192.g0881477623

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-04-24 11:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-17  0:18 [PATCH] compat: expose canonicalize_file_name to C++ Đoàn Trần Công Danh
2021-04-17 12:13 ` David Bremner
2021-04-17 12:49   ` Đoàn Trần Công Danh
2021-04-17 14:39     ` David Bremner
2021-04-18  4:13       ` Đoàn Trần Công Danh
2021-04-18  7:08         ` Tomi Ollila
2021-04-18 10:38           ` Đoàn Trần Công Danh
2021-04-23 17:31             ` David Bremner
2021-04-24  0:29               ` Đoàn Trần Công Danh
2021-04-18 12:48         ` David Bremner
2021-04-18 16:19           ` Tomi Ollila
2021-04-18 16:47             ` Tomi Ollila
2021-04-24  0:57 ` [PATCH v3] compat: rename {,notmuch_}canonicalize_file_name Đoàn Trần Công Danh
2021-04-24  1:01   ` Đoàn Trần Công Danh
2021-04-24  1:05   ` [PATCH v4] " Đoàn Trần Công Danh
2021-04-24 11:43     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).