Article View: gnu.utils.bug
Article #35Small patch for dd.c in fileutils 3.3
From: Mike Rendell
Date: Sat, 31 Oct 1992 10:48
Date: Sat, 31 Oct 1992 10:48
49 lines
1809 bytes
1809 bytes
Environment: MIPS M/120 running Risc/os 5.00, using MIPS 3.0 compilers This fixes a problem with encountered with the MIPS 3.0 C compiler. The compiler treats the following two situations differently: #define bsd43_islower(c) (.. c ..) #define islower bsd43_islower #define ISLOWER islower ISLOWER(c) and #define bsd43_islower(c) (.. c ..) #define islower bsd43_islower #define ISLOWER(c) islower(c) ISLOWER(c) The first expands to bsd43_islower(c) and the second expands to (.. c ..) This looks to me like a bug in the C compiler, not the dd code, but the work around is trivial. *** src/dd.c.orig Sat Oct 31 14:24:18 1992 --- src/dd.c Sat Oct 31 14:24:26 1992 *************** *** 56,63 **** #include <stdio.h> #include <ctype.h> #ifdef STDC_HEADERS ! #define ISLOWER(c) islower(c) ! #define ISUPPER(c) isupper(c) #else #define ISLOWER(c) (isascii ((c)) && islower ((c))) #define ISUPPER(c) (isascii ((c)) && isupper ((c))) --- 56,63 ---- #include <stdio.h> #include <ctype.h> #ifdef STDC_HEADERS ! #define ISLOWER islower ! #define ISUPPER isupper #else #define ISLOWER(c) (isascii ((c)) && islower ((c))) #define ISUPPER(c) (isascii ((c)) && isupper ((c))) -- Michael Rendell - Dept. of Comp. Sci., Memorial University of Newfoundland
Technical Details
Message-ID:
<9210311806.AA18818@mercury.cs.mun.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!mercury.cs.mun.ca!michaelShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!mercury.cs.mun.ca!michael From: michael@mercury.cs.mun.ca (Mike Rendell) Subject: Small patch for dd.c in fileutils 3.3 Message-ID: <9210311806.AA18818@mercury.cs.mun.ca> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sat, 31 Oct 1992 10:48:29 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 50