]> code.delx.au - gnu-emacs/blobdiff - lib-src/fakemail.c
(Fgarbage_collect):
[gnu-emacs] / lib-src / fakemail.c
index 93e14d7e961a7c12c6b4a9919c77aff158241e22..73898c6fb87d3b964e99431cb9d4862b880cb697 100644 (file)
@@ -22,17 +22,19 @@ Boston, MA 02111-1307, USA.  */
 #define NO_SHORTNAMES
 #include <../src/config.h>
 
-#if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
+#if defined (BSD_SYSTEM) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
 /* This program isnot used in BSD, so just avoid loader complaints.  */
-void
+int
 main ()
 {
+  return 0;
 }
 #else /* not BSD 4.2 (or newer) */
 #ifdef MSDOS
-void
+int
 main ()
 {
+  return 0;
 }
 #else /* not MSDOS */
 /* This conditional contains all the rest of the file.  */
@@ -59,6 +61,11 @@ main ()
 #include <ctype.h>
 #include <time.h>
 #include <pwd.h>
+
+/* This is to declare cuserid.  */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 \f
 /* Type definitions */
 
@@ -366,9 +373,9 @@ make_file_preface ()
   user_length = strlen (temp);
   the_user = alloc_string (user_length + 1);
   strcpy (the_user, temp);
-  the_string = alloc_string (3 + prefix_length +
-                            user_length +
-                            date_length);
+  the_string = alloc_string (3 + prefix_length
+                            + user_length
+                            date_length);
   temp = the_string;
   strcpy (temp, FROM_PREFIX);
   temp = &temp[prefix_length];
@@ -695,7 +702,7 @@ write_header (the_header)
   return;
 }
 \f
-void
+int
 main (argc, argv)
      int argc;
      char **argv;