#endif
#include <sys/types.h>
+#include <stdio.h>
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
#include <fcntl.h>
+#ifdef HAVE_PWD_H
#include <pwd.h>
+#endif
#include <stdio.h>
struct passwd *entry;
home_dir = (char *)NULL;
+#ifdef HAVE_GETPWUID
entry = getpwuid (getuid ());
if (entry)
home_dir = entry->pw_dir;
+#endif
return (home_dir);
}
sh_unset_nodelay_mode (fd)
int fd;
{
+#ifdef HAVE_FNCTL
int flags, bflags;
if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
flags &= ~bflags;
return (fcntl (fd, F_SETFL, flags));
}
+#endif
return 0;
}