-#include "internal.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_not_a_directory
-#include "messages.c"
-
-#include <stdio.h>
-#include <dirent.h>
-#include <errno.h>
-
-static int symlinkFlag = FALSE;
-static int removeoldFlag = FALSE;
-static int followLinks = TRUE;
-
-extern int ln_main(int argc, char **argv)
+/* BB_AUDIT SUSv3 compliant */
+/* BB_AUDIT GNU options missing: -d, -F, -i, and -v. */
+/* http://www.opengroup.org/onlinepubs/007904975/utilities/ln.html */
+
+//usage:#define ln_trivial_usage
+//usage: "[OPTIONS] TARGET... LINK|DIR"
+//usage:#define ln_full_usage "\n\n"
+//usage: "Create a link LINK or DIR/TARGET to the specified TARGET(s)\n"
+//usage: "\n -s Make symlinks instead of hardlinks"
+//usage: "\n -f Remove existing destinations"
+//usage: "\n -n Don't dereference symlinks - treat like normal file"
+//usage: "\n -b Make a backup of the target (if exists) before link operation"
+//usage: "\n -S suf Use suffix instead of ~ when making backup files"
+//usage:
+//usage:#define ln_example_usage
+//usage: "$ ln -s BusyBox /tmp/ls\n"
+//usage: "$ ls -l /tmp/ls\n"
+//usage: "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n"
+
+#include "libbb.h"
+
+/* This is a NOEXEC applet. Be very careful! */
+
+
+#define LN_SYMLINK 1
+#define LN_FORCE 2
+#define LN_NODEREFERENCE 4
+#define LN_BACKUP 8
+#define LN_SUFFIX 16
+
+int ln_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+int ln_main(int argc, char **argv)