aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2010-11-20 22:43:14 +0100
committermaximilian attems <max@stro.at>2010-11-20 22:43:14 +0100
commitb68e519c2952a276f09aa3464506fd36e133575a (patch)
treeefc81de47bca579410bfad0978ede5d04e47ec80
parent8a0606cf7aabce7533e50edf65b5156fbb7d0907 (diff)
downloadklibc-b68e519c2952a276f09aa3464506fd36e133575a.tar.gz
[klibc] cat cleanup ugly ifdefery
no point in carrying those ifdefs along, just cleanup the code that seems either BSD specific or can't work on klibc. Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/utils/cat.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/usr/utils/cat.c b/usr/utils/cat.c
index 1108d2e424333..746514851312d 100644
--- a/usr/utils/cat.c
+++ b/usr/utils/cat.c
@@ -39,13 +39,6 @@
#define __RCSID(arg)
#endif
-#if HAVE_NBTOOL_CONFIG_H
-#include "nbtool_config.h"
-#endif
-
-#ifndef __KLIBC__
-#include <sys/cdefs.h>
-#endif
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
The Regents of the University of California. All rights reserved.\n");
@@ -60,14 +53,8 @@ __RCSID("$NetBSD: cat.c,v 1.43 2004/01/04 03:31:28 jschauma Exp $");
#include <sys/stat.h>
#include <ctype.h>
-#ifndef __KLIBC__
-#include <err.h>
-#endif
#include <errno.h>
#include <fcntl.h>
-#ifndef __KLIBC__
-#include <locale.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -88,11 +75,6 @@ int main(int argc, char *argv[])
int ch;
struct flock stdout_lock;
-#ifndef __KLIBC__
- setprogname(argv[0]);
- (void)setlocale(LC_ALL, "");
-#endif
-
while ((ch = getopt(argc, argv, "beflnstuv")) != -1)
switch (ch) {
case 'b':
@@ -117,9 +99,7 @@ int main(int argc, char *argv[])
tflag = vflag = 1; /* -t implies -v */
break;
case 'u':
-#ifndef __KLIBC__
- setbuf(stdout, NULL);
-#endif
+ /* unimplemented */
break;
case 'v':
vflag = 1;