It turns out that DODMALLOC was broken when I reorganized busybox.h
[oweals/busybox.git] / coreutils / pwd.c
index f0c923b7b3cc35b1f777928feb30bdeba20a8fdc..a7a5f78a1771b847bfcb895792bf0c3573818832 100644 (file)
  *
  */
 
-#include "internal.h"
 #include <stdio.h>
 #include <dirent.h>
 #include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include "busybox.h"
 
 extern int pwd_main(int argc, char **argv)
 {
        char buf[BUFSIZ + 1];
 
        if (getcwd(buf, sizeof(buf)) == NULL)
-               fatalError("%s\n", strerror(errno));
+               perror_msg_and_die("getcwd");
 
-       printf("%s\n", buf);
-       return(TRUE);
+       puts(buf);
+       return EXIT_SUCCESS;
 }