aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii2009-03-21 11:31:50 +0000
committerEli Zaretskii2009-03-21 11:31:50 +0000
commit22749e9acb08d9a7ab78bdf930464b1f19012a63 (patch)
treebddda2f8f67fc48f7dd3c184f0e109fecc0139d4 /lib-src
parentcc15c0f2167a8fa39d80f5d29672ee9d9eebd418 (diff)
downloademacs-22749e9acb08d9a7ab78bdf930464b1f19012a63.tar.gz
emacs-22749e9acb08d9a7ab78bdf930464b1f19012a63.zip
inc/sys/stat.h (struct stat): Change the types of st_uid and st_gid to unsigned.
inc/pwd.h (struct passwd): Change the types of pw_uid and pw_gid to unsigned. (getpwuid): Argument is now unsigned. uid_t is now unsigned. ntlib.c (setuid): Argument is now unsigned. (getuid): Return value is now unsigned. (getpwuid): Argument is now unsigned. (fchown): UID and GID arguments are now unsigned. ntlib.h (fchown): UID and GID arguments are now unsigned. (getuid): Return value is now unsigned. (setuid): Argument is now unsigned. (getpwuid): Remove prototype (it's declared in nt/inc/pwd.h). w32.c (getpwuid): Change argument type to unsigned. (struct w32_id): Change type of `rid' member to unsigned. (w32_cached_id, w32_add_to_cache, get_name_and_id): Change type of argument ID to unsigned. All callers changed. (getuid, geteuid, getgid, getegid): Change return type to unsigned.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog12
-rw-r--r--lib-src/ntlib.c8
-rw-r--r--lib-src/ntlib.h7
3 files changed, 19 insertions, 8 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 4838f807d06..b9c6f1318e6 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,15 @@
12009-03-21 Eli Zaretskii <eliz@gnu.org>
2
3 * ntlib.c (setuid): Argument is now unsigned.
4 (getuid): Return value is now unsigned.
5 (getpwuid): Argument is now unsigned.
6 (fchown): UID and GID arguments are now unsigned.
7
8 * ntlib.h (fchown): UID and GID arguments are now unsigned.
9 (getuid): Return value is now unsigned.
10 (setuid): Argument is now unsigned.
11 (getpwuid): Remove prototype (it's declared in nt/inc/pwd.h).
12
12009-03-11 Stefan Monnier <monnier@iro.umontreal.ca> 132009-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
2 14
3 * emacsclient.c (main): Revert part of last change, so 15 * emacsclient.c (main): Revert part of last change, so
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 4ca7ae40aa1..bce4ce10f31 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -119,20 +119,20 @@ cuserid (char * s)
119 return name; 119 return name;
120} 120}
121 121
122int 122unsigned
123getuid () 123getuid ()
124{ 124{
125 return 0; 125 return 0;
126} 126}
127 127
128int 128int
129setuid (int uid) 129setuid (unsigned uid)
130{ 130{
131 return 0; 131 return 0;
132} 132}
133 133
134struct passwd * 134struct passwd *
135getpwuid (int uid) 135getpwuid (unsigned uid)
136{ 136{
137 return NULL; 137 return NULL;
138} 138}
@@ -185,7 +185,7 @@ getpass (const char * prompt)
185} 185}
186 186
187int 187int
188fchown (int fd, int uid, int gid) 188fchown (int fd, unsigned uid, unsigned gid)
189{ 189{
190 return 0; 190 return 0;
191} 191}
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h
index 4fe492241dd..7f9313c9ec4 100644
--- a/lib-src/ntlib.h
+++ b/lib-src/ntlib.h
@@ -35,11 +35,10 @@ char *getwd (char *dir);
35int getppid(void); 35int getppid(void);
36char * getlogin (); 36char * getlogin ();
37char * cuserid (char * s); 37char * cuserid (char * s);
38int getuid (); 38unsigned getuid ();
39int setuid (int uid); 39int setuid (unsigned uid);
40struct passwd * getpwuid (int uid);
41char * getpass (const char * prompt); 40char * getpass (const char * prompt);
42int fchown (int fd, int uid, int gid); 41int fchown (int fd, unsigned uid, unsigned gid);
43 42
44#ifndef BSTRING 43#ifndef BSTRING
45#define bzero(b, l) memset(b, 0, l) 44#define bzero(b, l) memset(b, 0, l)