[Github-comments] [geany/geany] Remove deprecated symbol: tm_get_real_path (PR #3024)

xiota notifications at xxxxx
Mon Nov 29 07:19:09 UTC 2021


@xiota commented on this pull request.



> @@ -2414,6 +2419,48 @@ void utils_start_new_geany_instance(const gchar *doc_path)
 }
 
 
+
+static int get_path_max(const char *path)
+{
+#ifdef PATH_MAX
+	return PATH_MAX;
+#else
+	int path_max = pathconf(path, _PC_PATH_MAX);
+	if (path_max <= 0)
+		path_max = 4096;
+	return path_max;
+#endif

I found two different manpages online that may apply to Mac... [iOS](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/realpath.3.html) and [Darwin](http://manpagez.com/man/3/realpath/).  The Darwin page states that it will return the "address of newly allocated memory" when the second argument is NULL.  The iOS page does not mention what happens.

I can change it to use NULL if you like.  It looks like the windows implementation in the file already supports that usage.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3024#discussion_r758089088
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211128/c472b627/attachment.htm>


More information about the Github-comments mailing list