nmh-workers
[Top][All Lists]
Advanced

[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

Hi,

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
    opt=-O3
    bs= #-DBUFSIZ=225
    tls=yes
    oauth=yes
    readline=yes

    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 \
        --with-readline=$readline

Makefile contains `AM_CPPFLAGS = -D_GNU_SOURCE -D_FORTIFY_SOURCE=2',
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.
https://plus.google.com/+RalphCorderoy



reply via email to

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