Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.bin/gzip



martin@ wrote:

> Module Name:	src
> Committed By:	martin
> Date:		Sat Jun  1 10:17:12 UTC 2024
> 
> Modified Files:
> 	src/usr.bin/gzip: gzip.c
> 
> Log Message:
> Fix typo in previous

---
@@ -1126,7 +1126,7 @@ copymodes(int fd, const struct stat *sbp
	if (fchmod(fd, sb.st_mode) < 0)
		maybe_warn("couldn't fchmod: %s", file);
 
-#if !HAVE_NBTOOL_CONFIG_H
+#ifdef !HAVE_NBTOOL_CONFIG_H
	TIMESPEC_TO_TIMEVAL(&times[0], &sb.st_atimespec);
	TIMESPEC_TO_TIMEVAL(&times[1], &sb.st_mtimespec);
	if (futimes(fd, times) < 0)
---

What's the problem in previous?
gzip.c already has the following lines:

>> #if HAVE_NBTOOL_CONFIG_H
>> #include "nbtool_config.h"
>> #endif

and <sys/disklabel.h> also has
>> #if !HAVE_NBTOOL_CONFIG_H
>> #define DISKUNIT(dev)   (minor(dev) / MAXPARTITIONS)
>> #define DISKPART(dev)   (minor(dev) % MAXPARTITIONS)
>> #define DISKMINOR(unit, part) \
>>     (((unit) * MAXPARTITIONS) + (part))
>> #endif /* !HAVE_NBTOOL_CONFIG_H */
(though <ufs/ufs.quota.h> etc uses !defined(HAVE_NBTOOL_CONFIG_H))

If HAVE_NBTOOL_CONFIG_H is not defined, it's treated as 0 so
!HAVE_NBTOOL_CONFIG_H still works.

If you don't like !HAVE_NBTOOL_CONFIG_H, could you please fix
all other files?

Thanks,
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index