aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2024-05-17 19:21:05 +0800
committerPo Lu2024-05-17 19:21:29 +0800
commit1f08984a67c94e957bec7f8c59818b627a67427b (patch)
tree8bec1accc256c920c4dbed4c5e1d5912aea785f9 /src
parent6ca3a60db3427bc6aef08144c1524920ff3d9c4d (diff)
downloademacs-1f08984a67c94e957bec7f8c59818b627a67427b.tar.gz
emacs-1f08984a67c94e957bec7f8c59818b627a67427b.zip
Port to certain Android environments with no GUI
* configure.ac (USER_FULL_NAME): Define to android_user_full_name only when a GUI system is being built. Otherwise, set to pw->pw_gecos or NULL consistently with the presence of pw->pw_gecos. * src/editfns.c (Fuser_full_name): Adjust to match. Accept NULL values from USER_FULL_NAME.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index fbfaaf66644..6b110b3d0e0 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1247,11 +1247,10 @@ is in general a comma-separated list. */)
1247 if (!pw) 1247 if (!pw)
1248 return Qnil; 1248 return Qnil;
1249 1249
1250#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
1251 p = android_user_full_name (pw);
1252#else
1253 p = USER_FULL_NAME; 1250 p = USER_FULL_NAME;
1254#endif 1251 if (!p)
1252 return Qnil;
1253
1255 /* Chop off everything after the first comma, since 'pw_gecos' is a 1254 /* Chop off everything after the first comma, since 'pw_gecos' is a
1256 comma-separated list. */ 1255 comma-separated list. */
1257 q = strchr (p, ','); 1256 q = strchr (p, ',');