summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-03 07:30:57 -0500
committerKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-03 07:30:57 -0500
commitf153e2fde097117a5a0c787f74aafa6670b08f11 (patch)
tree5ce5aa213d9178b54bd2db18d9ee29c29710a8b7
parent631eb2a4d278457dcf249279610a574d3b5dbcaa (diff)
downloaduserland-f153e2fde097117a5a0c787f74aafa6670b08f11.tar.gz
userland-f153e2fde097117a5a0c787f74aafa6670b08f11.tar.bz2
userland-f153e2fde097117a5a0c787f74aafa6670b08f11.tar.xz
userland-f153e2fde097117a5a0c787f74aafa6670b08f11.zip
usr.bin/printf: make buildable
-rw-r--r--usr.bin/printf/printf.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 4d88e7d..d89cafe 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -29,22 +29,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-#ifndef lint
-#if !defined(BUILTIN) && !defined(SHELL)
-__COPYRIGHT("@(#) Copyright (c) 1989, 1993\
- The Regents of the University of California. All rights reserved.");
-#endif
-#endif
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)printf.c 8.2 (Berkeley) 3/22/95";
-#else
-__RCSID("$NetBSD: printf.c,v 1.48 2019/01/27 12:03:09 kre Exp $");
-#endif
-#endif /* not lint */
-
#include <sys/types.h>
#include <ctype.h>
@@ -56,6 +40,7 @@ __RCSID("$NetBSD: printf.c,v 1.48 2019/01/27 12:03:09 kre Exp $");
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <bsd/stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -85,15 +70,6 @@ static char *b_fmt;
static int rval;
static char **gargv;
-#ifdef BUILTIN /* csh builtin */
-#define main progprintf
-#endif
-
-#ifdef SHELL /* sh (aka ash) builtin */
-#define main printfcmd
-#include "../../bin/sh/bltin/bltin.h"
-#endif /* SHELL */
-
#define PF(f, func) { \
if (fieldwidth != -1) { \
if (precision != -1) \
@@ -118,10 +94,6 @@ static char **gargv;
error = asprintf(cpp, f, func); \
}
-#ifdef main
-int main(int, char *[]);
-#endif
-
int
main(int argc, char *argv[])
{
@@ -132,9 +104,7 @@ main(int argc, char *argv[])
char ch;
int error, o;
-#if !defined(SHELL) && !defined(BUILTIN)
(void)setlocale (LC_ALL, "");
-#endif
rval = 0; /* clear for builtin versions (avoid holdover) */