diff options
author | Eli Zaretskii <eliz@gnu.org> | 2008-08-23 16:51:47 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2008-08-23 16:51:47 +0000 |
commit | d823c26bfda6c4811615ae7fea776c61272b61ca (patch) | |
tree | d677dad89ce422e7d5f0b880c8adc12d66231ba4 /src/editfns.c | |
parent | 7b4ded6d7993e2c5263faefc3261e910947a3aeb (diff) | |
download | emacs-d823c26bfda6c4811615ae7fea776c61272b61ca.tar.gz |
(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/editfns.c')
-rw-r--r-- | src/editfns.c | 6 |
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/>. */ #define NULL 0 #endif +#ifndef USER_FULL_NAME +#define USER_FULL_NAME pw->pw_gecos +#endif + #ifndef USE_CRT_DLL extern char **environ; #endif @@ -1370,7 +1374,7 @@ name, or nil if there is no such user. */) if (!pw) return Qnil; - p = (unsigned char *) pw->pw_gecos; + p = (unsigned char *) USER_FULL_NAME; /* Chop off everything after the first comma. */ q = (unsigned char *) index (p, ','); full = make_string (p, q ? q - p : strlen (p)); |