From 89fdc4e117285d001665922c93080c804a8f8810 Mon Sep 17 00:00:00 2001 From: Mike Barcroft Date: Wed, 25 Sep 2002 04:06:37 +0000 Subject: Use the standardized CHAR_BIT constant instead of NBBY in userland. --- libexec/ftpd/ftpcmd.y | 16 ++++++++-------- libexec/ftpd/ftpd.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libexec/ftpd') diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y index ec11dcd47c05..22ae19af10c2 100644 --- a/libexec/ftpd/ftpcmd.y +++ b/libexec/ftpd/ftpcmd.y @@ -393,16 +393,16 @@ cmd break; case TYPE_L: -#if NBBY == 8 +#if CHAR_BIT == 8 if (cmd_bytesz == 8) { reply(200, "Type set to L (byte size 8)."); type = cmd_type; } else reply(504, "Byte size must be 8."); -#else /* NBBY == 8 */ - UNIMPLEMENTED for NBBY != 8 -#endif /* NBBY == 8 */ +#else /* CHAR_BIT == 8 */ + UNIMPLEMENTED for CHAR_BIT != 8 +#endif /* CHAR_BIT == 8 */ } } } @@ -692,12 +692,12 @@ cmd #ifdef unix #ifdef BSD reply(215, "UNIX Type: L%d Version: BSD-%d", - NBBY, BSD); + CHAR_BIT, BSD); #else /* BSD */ - reply(215, "UNIX Type: L%d", NBBY); + reply(215, "UNIX Type: L%d", CHAR_BIT); #endif /* BSD */ #else /* unix */ - reply(215, "UNKNOWN Type: L%d", NBBY); + reply(215, "UNKNOWN Type: L%d", CHAR_BIT); #endif /* unix */ } @@ -916,7 +916,7 @@ type_code | L { cmd_type = TYPE_L; - cmd_bytesz = NBBY; + cmd_bytesz = CHAR_BIT; } | L SP byte_size { diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 9a22f88db0a6..180f0c11d37c 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -2148,8 +2148,8 @@ statcmd(void) if (type == TYPE_A || type == TYPE_E) printf(", FORM: %s", formnames[form]); if (type == TYPE_L) -#if NBBY == 8 - printf(" %d", NBBY); +#if CHAR_BIT == 8 + printf(" %d", CHAR_BIT); #else printf(" %d", bytesize); /* need definition! */ #endif -- cgit v1.3