🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Mike Rendell Sat, 31 Oct 1992 10:48
Small patch for dd.c in fileutils 3.3
#35
Author: Mike Rendell
Date: Sat, 31 Oct 1992 10:48
49 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads