bug-gnulib
[Top][All Lists]
Advanced

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

gnulib commit 0aa8ef42465 - free: Fix warning breaks parted


From: Brian C. Lane
Subject: gnulib commit 0aa8ef42465 - free: Fix warning breaks parted
Date: Tue, 26 Jan 2021 09:20:54 -0800

I encountered this while trying to prepare a new release of parted 3.4,
after updating gnulib to commits past b07286e464 (free-posix: port to
GNU/Linux) builds exit with this puzzling error:

make[4]: Entering directory '/home/bcl/Red_Hat/projs/parted/libparted/labels'
  CC       aix.lo
In file included from ../../include/parted/parted.h:44,
                 from aix.c:25:
pt-common.h:39:1: error: 'PedDiskOps' {aka 'const struct _PedDiskOps'} has no 
member named 'rpl_free'
   39 | free:                         PT_type##_free,   \
      | ^~~~
aix.c:217:2: note: in expansion of macro 'PT_op_function_initializers'
  217 |  PT_op_function_initializers (aix)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:1600: aix.lo] Error 1


In parted we have some macros in libparted/labels/pt-common.h that
handle mapping the disklabel's functions in a somewhat generic way:

https://git.savannah.gnu.org/cgit/parted.git/tree/libparted/labels/pt-common.h#n39

One of those is "free:  PT_type##_free," which appears to be getting
redefined to rpl_free by gnulib.

The change in commit 0aa8ef42 replaces "AC_DEFINE([free], [rpl_free],
..." with a simple "#define free rpl_free" which is bound to cause no
end of trouble for everyone. And when commit b07286e464 enabled it it
started hitting parted builds.

I'm not sure what the right fix for this is, but I'd appreciate it if
someone could figure out a way to do this that doesn't involve
arbitrarily re-defining words that may be used in other contexts.

Thanks,

Brian
parted co-maintainer

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart




reply via email to

[Prev in Thread] Current Thread [Next in Thread]