[Top][All Lists]

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

[Nmh-workers] _GNU_SOURCE Comes and Goes.

From: Ralph Corderoy
Subject: [Nmh-workers] _GNU_SOURCE Comes and Goes.
Date: Thu, 03 Aug 2017 16:39:25 +0100


I've seen this on and off and can now describe when it happens.

I normally run ./configure in a git checkout of master.

    #! /bin/sh

    cc='ccache cc' # -pg
    bs= #-DBUFSIZ=225

    rm -f config.cache
    ./configure \
        CC="$cc" \
        CFLAGS='-g '$opt' -ansi -pedantic -pedantic-errors -Werror '$bs \
        -C \
        --prefix=/home/tmp/1477291201.891102684/install \
        --with-oauth=$oauth --with-tls=$tls \

CPPFLAGS is empty, and `make -s' builds very quietly.

However, today I `git checkout 1.7-release' to edit NEWS and that showed
up the problem.  I didn't need to configure or make on that branch, just
switching to it, and then immediately `git checkout master' to switch
back shows the problem.

On a master `make -s' it now decides to go through a configure stage
first.  Both AM_CPPFLAGS and CPPFLAGS wind up empty and I get
compilation warnings like

    sbr/m_getfld.c:693:5: warning: implicit declaration of function ‘memmem’;
        did you mean ‘memset’? [-Wimplicit-function-declaration]
         memmem(bp, c, s->fdelim, s->fdelimlen));

This is reasonable because memmem(3) needs _GNU_SOURCE before the
#include of <string.h>.  (memset(3) has a different number of arguments,
so it's a bit bizarre the "spelling corrector" chooses that.)

So, something about flipping back and forth with checkout triggers make
to configure, and that configure doesn't spot the need for _GNU_SOURCE.

Cheers, Ralph.

reply via email to

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