extern char *malloc (), *realloc ();
#endif
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 400000
+#define CURRENT_USER
+#endif
+
#ifdef CURRENT_USER
extern struct passwd *getpwuid ();
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 400000
+extern uid_t geteuid ();
+#else
extern unsigned short geteuid ();
+#endif
static struct passwd *my_entry;
#define cuserid(s) \
(my_entry = getpwuid ((int) geteuid ()), \
make_file_preface (void)
{
char *the_string, *temp;
- long idiotic_interface;
+ time_t idiotic_interface;
long prefix_length;
long user_length;
long date_length;
the_date = ctime (&idiotic_interface);
/* the_date has an unwanted newline at the end */
date_length = strlen (the_date) - 1;
- the_date[date_length] = '\0';
+ if (the_date[date_length] == '\n')
+ the_date[date_length] = '\0';
#ifdef WIN32_NATIVE
temp = "(null)";
#else