(M31170): Separate U+83D4.
[chise/xemacs-chise.git] / lib-src / fakemail.c
index 1241fef..63ac5d5 100644 (file)
@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA.  */
 /* Synched up with: FSF 19.28. */
 
 #define NO_SHORTNAMES
-#include <../src/config.h>
+#include <config.h>
 
 #if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
 /* This program is not used in BSD, so just avoid loader complaints.  */
@@ -162,7 +162,7 @@ extern struct passwd *getpwuid ();
 extern unsigned short geteuid ();
 static struct passwd *my_entry;
 #define cuserid(s)                             \
-(my_entry = getpwuid (((int) geteuid ())),     \
+(my_entry = getpwuid ((int) geteuid ()),       \
  my_entry->pw_name)
 #endif
 \f
@@ -193,7 +193,7 @@ fatal (CONST char *s1, CONST char *s2)
 static char *
 xmalloc (size_t size)
 {
-  char *result = malloc (((unsigned) size));
+  char *result = (char *) malloc (size);
   if (result == ((char *) NULL))
     fatal ("virtual memory exhausted", (char *) 0);
   return result;
@@ -323,7 +323,11 @@ make_file_preface (void)
   /* the_date has an unwanted newline at the end */
   date_length = strlen (the_date) - 1;
   the_date[date_length] = '\0';
+#ifdef WINDOWSNT
+  temp = "(null)";
+#else
   temp = cuserid ((char *) NULL);
+#endif
   user_length = strlen (temp);
   the_user = alloc_string ((size_t) (user_length + 1));
   strcpy (the_user, temp);
@@ -634,10 +638,6 @@ main (int argc, char *argv[])
   register int size;
   FILE *the_pipe;
 
-#if !(__STDC__ || defined(STDC_HEADERS))
-  extern char *getenv ();
-#endif
-
   mail_program_name = getenv ("FAKEMAILER");
   if (!(mail_program_name && *mail_program_name))
     mail_program_name = (char *) MAIL_PROGRAM_NAME;