Since getuid() and getpwuid() exist on NG systems we might as well use them.
https://github.com/vim/vim/pull/4985
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Merging #4985 into master will increase coverage by
0.02%.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #4985 +/- ## ========================================== + Coverage 81.72% 81.75% +0.02% ========================================== Files 131 131 Lines 146540 146540 ========================================== + Hits 119761 119797 +36 + Misses 26779 26743 -36
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/terminal.c | 81.89% <0%> (-0.04%) |
⬇️ |
| src/os_unix.c | 63.5% <0%> (+0.04%) |
⬆️ |
| src/message.c | 79.52% <0%> (+0.05%) |
⬆️ |
| src/gui_gtk_x11.c | 58.21% <0%> (+0.09%) |
⬆️ |
| src/sign.c | 94.59% <0%> (+0.18%) |
⬆️ |
| src/netbeans.c | 27.46% <0%> (+0.22%) |
⬆️ |
| src/profiler.c | 94.67% <0%> (+0.56%) |
⬆️ |
| src/gui.c | 64.32% <0%> (+0.61%) |
⬆️ |
| src/ui.c | 70.32% <0%> (+1.25%) |
⬆️ |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update d2c1fb4...91328a8. Read the comment docs.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
@yegappan's comment is not forwarded here.
https://groups.google.com/d/msg/vim_dev/Y9Ir9BWdIMU/YZ54udMoBQAJ
It looks like you are building Vim on Amiga. Recently many refactoring
changes were made to the Vim sources. I couldn't verify these changes
on an Amiga platform (as i don't have access to one). Are you able to
build the different Vim variants (tiny, normal, huge) on Amiga successfully
with the latest sources?
—
@dpelle commented on this pull request.
In src/os_amiga.c:
> @@ -664,9 +664,20 @@ mch_can_restore_icon(void)
int
mch_get_user_name(char_u *s, int len)
{
+#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
+ int uid = getuid();
+ struct passwd *pwd = getpwuid(uid);
+
+ if (pwd && pwd->pw_name && len > 0)
+ {
+ vim_strncpy(s, (char_u *) pwd->pw_name, len - 1);
+ return OK;
+ }
The function has no return statement if the condition at line 671 is false (→ undefined behavior).
—
You are receiving this because you are subscribed to this thread.
@sodero commented on this pull request.
In src/os_amiga.c:
> @@ -664,9 +664,20 @@ mch_can_restore_icon(void)
int
mch_get_user_name(char_u *s, int len)
{
+#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
+ int uid = getuid();
+ struct passwd *pwd = getpwuid(uid);
+
+ if (pwd && pwd->pw_name && len > 0)
+ {
+ vim_strncpy(s, (char_u *) pwd->pw_name, len - 1);
+ return OK;
+ }
Silly misstake. Fixed it now.
Thanks,
Yegappan