Discussion:
CVS commit: src/usr.bin/gzip
(too old to reply)
Izumi Tsutsui
2024-06-01 14:17:11 UTC
Permalink
Module Name: src
Committed By: martin
Date: Sat Jun 1 10:17:12 UTC 2024
src/usr.bin/gzip: gzip.c
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?
#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

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Martin Husemann
2024-06-01 14:27:12 UTC
Permalink
Post by Izumi Tsutsui
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
[..]
Post by Izumi Tsutsui
If HAVE_NBTOOL_CONFIG_H is not defined, it's treated as 0 so
!HAVE_NBTOOL_CONFIG_H still works.
Your diff is backwards and I guess that is the cause for the confusion.

The change was from #ifdef (which does not work with !) to #if, to
unbreak the build.

The !HAVE_NBTOOL_CONFIG_H is still there and everything should work as
you intended.

Martin

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2024-06-01 18:25:31 UTC
Permalink
Post by Martin Husemann
Your diff is backwards and I guess that is the cause for the confusion.
Ah, I checked a wrong tree. Sorry for the noise.
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...