aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2008-08-23 16:51:47 +0000
committerEli Zaretskii2008-08-23 16:51:47 +0000
commitd823c26bfda6c4811615ae7fea776c61272b61ca (patch)
treed677dad89ce422e7d5f0b880c8adc12d66231ba4 /src
parent7b4ded6d7993e2c5263faefc3261e910947a3aeb (diff)
downloademacs-d823c26bfda6c4811615ae7fea776c61272b61ca.tar.gz
emacs-d823c26bfda6c4811615ae7fea776c61272b61ca.zip
(USER_FULL_NAME): Define to pw->pw_gecos if undefined.
(Fuser_full_name): Use USER_FULL_NAME instead of a literal pw->pw_gecos.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 71973cec914..1915de5f7c7 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -67,6 +67,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
67#define NULL 0 67#define NULL 0
68#endif 68#endif
69 69
70#ifndef USER_FULL_NAME
71#define USER_FULL_NAME pw->pw_gecos
72#endif
73
70#ifndef USE_CRT_DLL 74#ifndef USE_CRT_DLL
71extern char **environ; 75extern char **environ;
72#endif 76#endif
@@ -1370,7 +1374,7 @@ name, or nil if there is no such user. */)
1370 if (!pw) 1374 if (!pw)
1371 return Qnil; 1375 return Qnil;
1372 1376
1373 p = (unsigned char *) pw->pw_gecos; 1377 p = (unsigned char *) USER_FULL_NAME;
1374 /* Chop off everything after the first comma. */ 1378 /* Chop off everything after the first comma. */
1375 q = (unsigned char *) index (p, ','); 1379 q = (unsigned char *) index (p, ',');
1376 full = make_string (p, q ? q - p : strlen (p)); 1380 full = make_string (p, q ? q - p : strlen (p));