coreutils
[Top][All Lists]
Advanced

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

build: add src/termios.c to the tarball


From: Collin Funk
Subject: build: add src/termios.c to the tarball
Date: Sat, 21 Jun 2025 22:47:26 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Pádraig,

I have 2 patches attached.

First, I noticed many instances of three-valued comparisons written
like:

   return (a > b) - (a < b);

I think it will take a bit of thought for new contributors to understand
this. Instead we can use _GL_CMP which does the same thing (and Gnulib
will probably never remove).

A new contributor can grep for the _GL_CMP definition and read the
detailed comment in m4/gnulib-common.m4 or lib/config.h(in)? to
understand it.

After writing that patch, I noticed that building from a tarball will
fail with the following error:

    make[2]: *** No rule to make target 'src/termios.c', needed by 
'src/speedlist.h'.  Stop.
    make[2]: Leaving directory '/tmp/coreutils-9.7.51-10e69'
    make[1]: *** [Makefile:23430: all-recursive] Error 1
    make[1]: Leaving directory '/tmp/coreutils-9.7.51-10e69'
    make: *** [Makefile:9345: all] Error 2

The recent patches to let 'stty' support arbitrary baud rates added
src/speedlist.h which is generated by src/termios.c passed into the C
preprocessor. Therefore it should be added to EXTRA_DIST. Done with the
second patch.

Collin

Attachment: 0001-maint-use-_GL_CMP-instead-of-handwriting-three-value.patch
Description: Text Data

Attachment: 0002-build-add-src-termios.c-to-the-tarball.patch
Description: Text Data


reply via email to

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