comparison lib-src/fakemail.c @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents 3ecd8885ac67
children 84b14dcb0985
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
160 #ifdef CURRENT_USER 160 #ifdef CURRENT_USER
161 extern struct passwd *getpwuid (); 161 extern struct passwd *getpwuid ();
162 extern unsigned short geteuid (); 162 extern unsigned short geteuid ();
163 static struct passwd *my_entry; 163 static struct passwd *my_entry;
164 #define cuserid(s) \ 164 #define cuserid(s) \
165 (my_entry = getpwuid (((int) geteuid ())), \ 165 (my_entry = getpwuid ((int) geteuid ()), \
166 my_entry->pw_name) 166 my_entry->pw_name)
167 #endif 167 #endif
168 168
169 /* Utilities */ 169 /* Utilities */
170 170
191 /* Like malloc but get fatal error if memory is exhausted. */ 191 /* Like malloc but get fatal error if memory is exhausted. */
192 192
193 static char * 193 static char *
194 xmalloc (size_t size) 194 xmalloc (size_t size)
195 { 195 {
196 char *result = malloc (((unsigned) size)); 196 char *result = (char *) malloc (size);
197 if (result == ((char *) NULL)) 197 if (result == ((char *) NULL))
198 fatal ("virtual memory exhausted", (char *) 0); 198 fatal ("virtual memory exhausted", (char *) 0);
199 return result; 199 return result;
200 } 200 }
201 201