Mercurial > emacs
comparison src/editfns.c @ 75217:9e5c071deb9f
(Fuser_uid, Fuser_real_uid): Copy values returned by geteuid and getuid
into EMACS_INT to avoid GCC warnings.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 13 Jan 2007 21:46:02 +0000 |
parents | ea255892b6fd |
children | 41b2aae64f85 |
comparison
equal
deleted
inserted
replaced
75216:4ffeb7d1d7ba | 75217:9e5c071deb9f |
---|---|
1312 DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, | 1312 DEFUN ("user-uid", Fuser_uid, Suser_uid, 0, 0, 0, |
1313 doc: /* Return the effective uid of Emacs. | 1313 doc: /* Return the effective uid of Emacs. |
1314 Value is an integer or float, depending on the value. */) | 1314 Value is an integer or float, depending on the value. */) |
1315 () | 1315 () |
1316 { | 1316 { |
1317 return make_fixnum_or_float (geteuid ()); | 1317 /* Assignment to EMACS_INT stops GCC whining about limited range of |
1318 data type. */ | |
1319 EMACS_INT euid = geteuid (); | |
1320 return make_fixnum_or_float (euid); | |
1318 } | 1321 } |
1319 | 1322 |
1320 DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, | 1323 DEFUN ("user-real-uid", Fuser_real_uid, Suser_real_uid, 0, 0, 0, |
1321 doc: /* Return the real uid of Emacs. | 1324 doc: /* Return the real uid of Emacs. |
1322 Value is an integer or float, depending on the value. */) | 1325 Value is an integer or float, depending on the value. */) |
1323 () | 1326 () |
1324 { | 1327 { |
1325 return make_fixnum_or_float (getuid ()); | 1328 /* Assignment to EMACS_INT stops GCC whining about limited range of |
1329 data type. */ | |
1330 EMACS_INT uid = getuid (); | |
1331 return make_fixnum_or_float (uid); | |
1326 } | 1332 } |
1327 | 1333 |
1328 DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, | 1334 DEFUN ("user-full-name", Fuser_full_name, Suser_full_name, 0, 1, 0, |
1329 doc: /* Return the full name of the user logged in, as a string. | 1335 doc: /* Return the full name of the user logged in, as a string. |
1330 If the full name corresponding to Emacs's userid is not known, | 1336 If the full name corresponding to Emacs's userid is not known, |