bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Trouble with gnulib/float.h on Intrepid
@ 2013-10-08 22:13 Rhys Ulerich
  2013-10-08 22:30 ` Eric Blake
  0 siblings, 1 reply; 14+ messages in thread
From: Rhys Ulerich @ 2013-10-08 22:13 UTC (permalink / raw
  To: Gnulib Bugs

On Intrepid, a BG/P system up at Argonne with some fun old IBM XL
compilers, a user of mine is seeing gnulib/float.h containing the line
    #include " "
which appears to be arising from
    configure:13477: checking absolute name of <float.h>
    configure:13516: result: ""
due to http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=m4/float_h.m4
where
    host_cpu='powerpc64'
    host_os='linux-gnu'
    host_vendor='unknown'

What information might I collect to help debug this?  This is atop
gnulib HEAD.  I have a full config.log sitting around and would be
happy to send it someone's way in addition to the generated configure
file.

- Rhys


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-08 22:13 Trouble with gnulib/float.h on Intrepid Rhys Ulerich
@ 2013-10-08 22:30 ` Eric Blake
  2013-10-09 13:54   ` Rhys Ulerich
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Blake @ 2013-10-08 22:30 UTC (permalink / raw
  To: Rhys Ulerich; +Cc: Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

On 10/08/2013 04:13 PM, Rhys Ulerich wrote:
> On Intrepid, a BG/P system up at Argonne with some fun old IBM XL
> compilers, a user of mine is seeing gnulib/float.h containing the line
>     #include " "
> which appears to be arising from
>     configure:13477: checking absolute name of <float.h>
>     configure:13516: result: ""
> due to http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=m4/float_h.m4
> where
>     host_cpu='powerpc64'
>     host_os='linux-gnu'
>     host_vendor='unknown'
> 
> What information might I collect to help debug this?  This is atop
> gnulib HEAD.  I have a full config.log sitting around and would be
> happy to send it someone's way in addition to the generated configure
> file.

The full config.log would be useful to see if configure left any more
hints about why it couldn't determine an absolute name for <float.h>;
you might also want to try repeating the $CC tests listed in the
config.log but do it by hand, to give us more details about the
compilation environment and what the preprocessor will let us learn
about a system header.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-08 22:30 ` Eric Blake
@ 2013-10-09 13:54   ` Rhys Ulerich
  2013-10-09 21:45     ` Rhys Ulerich
  0 siblings, 1 reply; 14+ messages in thread
From: Rhys Ulerich @ 2013-10-09 13:54 UTC (permalink / raw
  To: Eric Blake; +Cc: Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

>> On Intrepid, a BG/P system up at Argonne with some fun old IBM XL
>> compilers, a user of mine is seeing gnulib/float.h containing the line
>>     #include " "
>> which appears to be arising from
>>     configure:13477: checking absolute name of <float.h>
>>     configure:13516: result: ""

> The full config.log would be useful to see if configure left any more
> hints about why it couldn't determine an absolute name for <float.h>;

Attached is a gzipped version of config.log where I've trimmed section
output beyond the lines quoted above.  The full gzipped log came in
too large to attach.  Please email if I cut out something crucial.

> you might also want to try repeating the $CC tests listed in the
> config.log but do it by hand, to give us more details about the
> compilation environment and what the preprocessor will let us learn
> about a system header.

I will take a stab at this and report back.  It may be a couple of days
as I don't personally have access to the system.

Thanks,
Rhys

[-- Attachment #2: config.log.trimmed.gz --]
[-- Type: application/x-gzip, Size: 26886 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-09 13:54   ` Rhys Ulerich
@ 2013-10-09 21:45     ` Rhys Ulerich
  2013-10-09 21:58       ` Eric Blake
  0 siblings, 1 reply; 14+ messages in thread
From: Rhys Ulerich @ 2013-10-09 21:45 UTC (permalink / raw
  To: Eric Blake; +Cc: Gnulib Bugs

> I will take a stab at this and report back.  It may be a couple of days
> as I don't personally have access to the system.

I'm all thumbs at this.  I do see the following suspect differences at
the tail of that config.log.trimmed I attached previously:

NEXT_ERRNO_H=''
NEXT_FCNTL_H='"///bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/fcntl.h"'
NEXT_FLOAT_H='""'
...
NEXT_SYSEXITS_H='""'

You'll notice that NEXT_FLOAT_H has a quoted empty string instead of
an empty string.  On this system, gnulib/float.h is produced but
gnulib/sysexit.h is not.

Any guidance much appreciated... I'm not quite sure where to begin effectively.

- Rhys


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-09 21:45     ` Rhys Ulerich
@ 2013-10-09 21:58       ` Eric Blake
  2013-10-11 18:11         ` Rhys Ulerich
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Blake @ 2013-10-09 21:58 UTC (permalink / raw
  To: Rhys Ulerich; +Cc: Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

On 10/09/2013 03:45 PM, Rhys Ulerich wrote:
>> I will take a stab at this and report back.  It may be a couple of days
>> as I don't personally have access to the system.
> 
> I'm all thumbs at this.  I do see the following suspect differences at
> the tail of that config.log.trimmed I attached previously:
> 
> NEXT_ERRNO_H=''
> NEXT_FCNTL_H='"///bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/fcntl.h"'
> NEXT_FLOAT_H='""'
> ...
> NEXT_SYSEXITS_H='""'
> 
> You'll notice that NEXT_FLOAT_H has a quoted empty string instead of
> an empty string.  On this system, gnulib/float.h is produced but
> gnulib/sysexit.h is not.

Your config log says you are using CC=bgxlc_r.  Can you collect the
following output:

$ echo '#include <fcntl.h>' > foo.c
$ bgxlc_r -E foo.c > fcntl.out
$ echo '#include <float.h>' > foo.c
$ bgxlc_r -E foo.c > float.out

as well as a copy of your system's <float.h>?  My guess is that your
float.h is macro-only, and therefore gives us nothing to go by to tell
where it lives. We already special-case AIX, using a different mode of
'$CC -C -E' to make the preprocessed output more verbose; is there some
compiler switch for bgxlc_r (maybe -C, maybe some other spelling) that
makes the output more verbose?  Basically, we are looking for some way
of inspecting the preprocessor output to reverse-engineer the path to
the file that actually got included.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-09 21:58       ` Eric Blake
@ 2013-10-11 18:11         ` Rhys Ulerich
  2013-10-11 18:25           ` Eric Blake
  0 siblings, 1 reply; 14+ messages in thread
From: Rhys Ulerich @ 2013-10-11 18:11 UTC (permalink / raw
  To: Eric Blake; +Cc: Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]

Hi Eric,

An update...

> $ echo '#include <fcntl.h>' > foo.c
> $ bgxlc_r -E foo.c > fcntl.out

Apparently my user hacked around an issue here.  As produced, the
configure script identified a fcntl.h under
/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/powerpc-bgp-linux/sys-include/bits/
which broke his compilation due to the header beginning with
#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
That file is attached as fcntl_error.h.

The user mucked around a bit and made the code include a different
fcntl.h from "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/powerpc-bgp-linux/sys-include/"
which works okay.  It is attached as fcntl_okay.h.
It worked okay.

> $ echo '#include <float.h>' > foo.c
> $ bgxlc_r -E foo.c > float.out

This produces a zero-length float.out.  My user reports there's no
float.h file sitting alongside other headers in the usual places.

> We already special-case AIX, using a different mode of
> '$CC -C -E' to make the preprocessed output more verbose; is there some
> compiler switch for bgxlc_r (maybe -C, maybe some other spelling) that
> makes the output more verbose?

Trying again with -C (documented in the attached man page, in case
that's helpful at all) a la

> $ echo '#include <float.h>' > foo.c
> $ bgxlc_r -C -E foo.c > float.out

produces the output attached as float_with_-C.out.

I'm happy to keep trying to provide what's necessary to get this
sorted, but feel free to bail on the effort whenever this turns into a
time suck.

That said, thank you,
Rhys

[-- Attachment #2: fcntl.out --]
[-- Type: application/octet-stream, Size: 10808 bytes --]

#line 61 "/soft/apps/ibmcmp-jan2013/vac/bg/9.0/crt/include/stddef.h"
typedef	unsigned int	size_t;
#line 34 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/types.h"
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
#line 40
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
#line 50
__extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#line 59
__extension__ typedef long long int __quad_t;
__extension__ typedef unsigned long long int __u_quad_t;
#line 137
__extension__ typedef __u_quad_t __dev_t;	 
__extension__ typedef unsigned int __uid_t;	 
__extension__ typedef unsigned int __gid_t;	 
__extension__ typedef unsigned long int __ino_t;	 
__extension__ typedef __u_quad_t __ino64_t;	 
__extension__ typedef unsigned int __mode_t;	 
__extension__ typedef unsigned int __nlink_t;	 
__extension__ typedef long int __off_t;	 
__extension__ typedef __quad_t __off64_t;	 
__extension__ typedef int __pid_t;	 
__extension__ typedef struct { int __val[2]; } __fsid_t;	 
__extension__ typedef long int __clock_t;	 
__extension__ typedef unsigned long int __rlim_t;	 
__extension__ typedef __u_quad_t __rlim64_t;	 
__extension__ typedef unsigned int __id_t;		 
__extension__ typedef long int __time_t;	 
__extension__ typedef unsigned int __useconds_t;  
__extension__ typedef long int __suseconds_t;  

__extension__ typedef int __daddr_t;	 
__extension__ typedef long int __swblk_t;	 
__extension__ typedef int __key_t;	 
#line 161
__extension__ typedef int __clockid_t;
#line 164
__extension__ typedef void * __timer_t;
#line 167
__extension__ typedef long int __blksize_t;
#line 172
__extension__ typedef long int __blkcnt_t;
__extension__ typedef __quad_t __blkcnt64_t;
#line 176
__extension__ typedef unsigned long int __fsblkcnt_t;
__extension__ typedef __u_quad_t __fsblkcnt64_t;
#line 180
__extension__ typedef unsigned long int __fsfilcnt_t;
__extension__ typedef __u_quad_t __fsfilcnt64_t;

__extension__ typedef int __ssize_t;  
#line 187
typedef __off64_t __loff_t;	 
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
#line 192
__extension__ typedef int __intptr_t;
#line 195
__extension__ typedef unsigned int __socklen_t;
#line 35 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/sys/types.h"
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
#line 46
typedef __loff_t loff_t;
#line 50
typedef __ino_t ino_t;
#line 62
typedef __dev_t dev_t;
#line 67
typedef __gid_t gid_t;
#line 72
typedef __mode_t mode_t;
#line 77
typedef __nlink_t nlink_t;
#line 82
typedef __uid_t uid_t;
#line 88
typedef __off_t off_t;
#line 100
typedef __pid_t pid_t;
#line 105
typedef __id_t id_t;
#line 110
typedef __ssize_t ssize_t;
#line 116
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
#line 123
typedef __key_t key_t;
#line 77 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/time.h"
typedef __time_t time_t;
#line 93
typedef __clockid_t clockid_t;
#line 105
typedef __timer_t timer_t;
#line 151 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/sys/types.h"
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
#line 195
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
#line 201
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef int register_t __attribute__ ((__mode__ (__word__)));
#line 23 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/sigset.h"
typedef int __sig_atomic_t;
#line 28
typedef struct
  {
    unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
  } __sigset_t;
#line 38 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/sys/select.h"
typedef __sigset_t sigset_t;
#line 121 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/time.h"
struct timespec
  {
    __time_t tv_sec;		 
    long int tv_nsec;		 
  };
#line 69 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/time.h"
struct timeval
  {
    __time_t tv_sec;		 
    __suseconds_t tv_usec;	 
  };
#line 49 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/sys/select.h"
typedef __suseconds_t suseconds_t;
#line 55
typedef long int __fd_mask;
#line 67
typedef struct
  {
#line 75
    __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask))];
#line 78
  } fd_set;
#line 85
typedef __fd_mask fd_mask;
#line 109
extern int select (int __nfds, fd_set *__restrict __readfds,
		   fd_set *__restrict __writefds,
		   fd_set *__restrict __exceptfds,
		   struct timeval *__restrict __timeout);
#line 121
extern int pselect (int __nfds, fd_set *__restrict __readfds,
		    fd_set *__restrict __writefds,
		    fd_set *__restrict __exceptfds,
		    const struct timespec *__restrict __timeout,
		    const __sigset_t *__restrict __sigmask);
#line 29 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/sys/sysmacros.h"
__extension__
extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
     ;
__extension__
extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
     ;
__extension__
extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
							unsigned int __minor)
     ;
#line 41
__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev)
{
  return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

__extension__ extern __inline unsigned int
__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev)
{
  return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}

__extension__ extern __inline unsigned long long int
__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor)
{
  return ((__minor & 0xff) | ((__major & 0xfff) << 8)
	  | (((unsigned long long int) (__minor & ~0xff)) << 12)
	  | (((unsigned long long int) (__major & ~0xfff)) << 32));
}
#line 235 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/sys/types.h"
typedef __blkcnt_t blkcnt_t;	  
#line 239
typedef __fsblkcnt_t fsblkcnt_t;  
#line 243
typedef __fsfilcnt_t fsfilcnt_t;  
#line 51 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/pthreadtypes.h"
typedef unsigned long int pthread_t;
#line 54
typedef union
{
  char __size[36];
  long int __align__workaround;
} pthread_attr_t;
#line 68
typedef struct __pthread_internal_slist
{
  struct __pthread_internal_slist *__next;
} __pthread_slist_t;
#line 77
typedef union
{
  struct __pthread_mutex_s
  {
    volatile int __lock;
    volatile unsigned int __count;
    volatile int __owner;
#line 89
    int __kind;
#line 95
    unsigned int __nusers;
    __extension__ union
    {
      int __spins;
      __pthread_slist_t __list;
    };

  } __data;
  char __size[24];
  long int __align__workaround;
} pthread_mutex_t;

typedef union
{
  char __size[4];
  int __align__workaround;
} pthread_mutexattr_t;
#line 116
typedef union
{
  struct
  {
    volatile int __lock;
    unsigned int __futex;
    __extension__ unsigned long long int __total_seq;
    __extension__ unsigned long long int __wakeup_seq;
    __extension__ unsigned long long int __woken_seq;
    void *__mutex;
    unsigned int __nwaiters;
    unsigned int __broadcast_seq;
  } __data;
  char __size[48];
  __extension__ long long int __align__workaround;
} pthread_cond_t;

typedef union
{
  char __size[4];
  int __align__workaround;
} pthread_condattr_t;
#line 141
typedef unsigned int pthread_key_t;
#line 145
typedef int pthread_once_t;
#line 151
typedef union
{
#line 171
  struct
  {
    volatile int __lock;
    unsigned int __nr_readers;
    unsigned int __readers_wakeup;
    unsigned int __writer_wakeup;
    unsigned int __nr_readers_queued;
    unsigned int __nr_writers_queued;
#line 181
    unsigned int __flags;
    int __writer;
  } __data;

  char __size[32];
  long int __align__workaround;
} pthread_rwlock_t;

typedef union
{
  char __size[8];
  long int __align__workaround;
} pthread_rwlockattr_t;
#line 199
typedef volatile int pthread_spinlock_t;
#line 204
typedef union
{
  char __size[20];
  long int __align__workaround;
} pthread_barrier_t;

typedef union
{
  char __size[4];
  int __align__workaround;
} pthread_barrierattr_t;
#line 138 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/bits/fcntl.h"
struct flock
  {
    short int l_type;	 
    short int l_whence;	 

    __off_t l_start;	 
    __off_t l_len;	 
#line 149
    __pid_t l_pid;	 
  };
#line 197
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
    ;
#line 201
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
    ;
#line 76 "/bgsys/drivers/V1R4M2_200_2010-100508P/ppc/gnu-linux/lib/gcc/powerpc-bgp-linux/4.1.2/../../../../powerpc-bgp-linux/sys-include/fcntl.h"
extern int fcntl (int __fd, int __cmd, ...);
#line 85
extern int open (const char *__file, int __oflag, ...) ;
#line 130
extern int creat (const char *__file, __mode_t __mode) ;
#line 159
extern int lockf (int __fd, int __cmd, __off_t __len);
#line 176
extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
			  int __advise) ;
#line 198
extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);

[-- Attachment #3: fcntl_error.h --]
[-- Type: text/x-chdr, Size: 7661 bytes --]

/* O_*, F_*, FD_* bit values for Linux/PowerPC.
   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2003, 2004
   Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */

#ifndef	_FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif


#include <sys/types.h>

/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
   located on an ext2 file system */
#define O_ACCMODE	  0003
#define O_RDONLY	    00
#define O_WRONLY	    01
#define O_RDWR		    02
#define O_CREAT		  0100	/* not fcntl */
#define O_EXCL		  0200	/* not fcntl */
#define O_NOCTTY	  0400	/* not fcntl */
#define O_TRUNC		 01000	/* not fcntl */
#define O_APPEND	 02000
#define O_NONBLOCK	 04000
#define O_NDELAY	O_NONBLOCK
#define O_SYNC		010000
#define O_FSYNC		O_SYNC
#define O_ASYNC		020000

#ifdef __USE_GNU
# define O_DIRECT	0400000	/* Direct disk access.	*/
# define O_DIRECTORY	 040000	/* Must be a directory.	 */
# define O_NOFOLLOW	0100000	/* Do not follow links.	 */
# define O_NOATIME	01000000 /* Do not set atime.  */
#endif

#ifdef __USE_LARGEFILE64
# define O_LARGEFILE	0200000
#endif

/* For now Linux has synchronisity options for data and read operations.
   We define the symbols here but let them do the same as O_SYNC since
   this is a superset.	*/
#if defined __USE_POSIX199309 || defined __USE_UNIX98
# define O_DSYNC	O_SYNC	/* Synchronize data.  */
# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
#endif

/* Values for the second argument to `fcntl'.  */
#define F_DUPFD		0	/* Duplicate file descriptor.  */
#define F_GETFD		1	/* Get file descriptor flags.  */
#define F_SETFD		2	/* Set file descriptor flags.  */
#define F_GETFL		3	/* Get file status flags.  */
#define F_SETFL		4	/* Set file status flags.  */
#ifndef __USE_FILE_OFFSET64
# define F_GETLK	5	/* Get record locking info.  */
# define F_SETLK	6	/* Set record locking info (non-blocking).  */
# define F_SETLKW	7	/* Set record locking info (blocking).	*/
#else
# define F_GETLK	F_GETLK64  /* Get record locking info.	*/
# define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
# define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
#endif
#define F_GETLK64	12	/* Get record locking info.  */
#define F_SETLK64	13	/* Set record locking info (non-blocking).  */
#define F_SETLKW64	14	/* Set record locking info (blocking).	*/

#if defined __USE_BSD || defined __USE_UNIX98
# define F_SETOWN	8	/* Get owner of socket (receiver of SIGIO).  */
# define F_GETOWN	9	/* Set owner of socket (receiver of SIGIO).  */
#endif

#ifdef __USE_GNU
# define F_SETSIG	10	/* Set number of signal to be sent.  */
# define F_GETSIG	11	/* Get number of signal to be sent.  */
#endif

#ifdef __USE_GNU
# define F_SETLEASE	1024	/* Set a lease.	 */
# define F_GETLEASE	1025	/* Enquire what lease is active.  */
# define F_NOTIFY	1026	/* Request notfications on a directory.	 */
#endif

/* For F_[GET|SET]FL.  */
#define FD_CLOEXEC	1	/* actually anything with low bit set goes */

/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
#define F_RDLCK		0	/* Read lock.  */
#define F_WRLCK		1	/* Write lock.	*/
#define F_UNLCK		2	/* Remove lock.	 */

/* For old implementation of bsd flock().  */
#define F_EXLCK		4	/* or 3 */
#define F_SHLCK		8	/* or 4 */

#ifdef __USE_BSD
/* Operations for bsd flock(), also used by the kernel implementation.	*/
# define LOCK_SH	1	/* shared lock */
# define LOCK_EX	2	/* exclusive lock */
# define LOCK_NB	4	/* or'd with one of the above to prevent
				   blocking */
# define LOCK_UN	8	/* remove lock */
#endif

#ifdef __USE_GNU
# define LOCK_MAND	32	/* This is a mandatory flock:	*/
# define LOCK_READ	64	/* ... which allows concurrent read operations.	 */
# define LOCK_WRITE	128	/* ... which allows concurrent write operations.  */
# define LOCK_RW	192	/* ... Which allows concurrent read & write operations.	 */
#endif

#ifdef __USE_GNU
/* Types of directory notifications that may be requested with F_NOTIFY.  */
# define DN_ACCESS	0x00000001	/* File accessed.  */
# define DN_MODIFY	0x00000002	/* File modified.  */
# define DN_CREATE	0x00000004	/* File created.  */
# define DN_DELETE	0x00000008	/* File removed.  */
# define DN_RENAME	0x00000010	/* File renamed.  */
# define DN_ATTRIB	0x00000020	/* File changed attibutes.  */
# define DN_MULTISHOT	0x80000000	/* Don't remove notifier.  */
#endif

struct flock
  {
    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
#ifndef __USE_FILE_OFFSET64
    __off_t l_start;	/* Offset where the lock begins.  */
    __off_t l_len;	/* Size of the locked area; zero means until EOF.  */
#else
    __off64_t l_start;	/* Offset where the lock begins.  */
    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
#endif
    __pid_t l_pid;	/* Process holding the lock.  */
  };

#ifdef __USE_LARGEFILE64
struct flock64
  {
    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
    __off64_t l_start;	/* Offset where the lock begins.  */
    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
    __pid_t l_pid;	/* Process holding the lock.  */
  };
#endif

/* Define some more compatibility macros to be backward compatible with
   BSD systems which did not managed to hide these kernel macros.  */
#ifdef	__USE_BSD
# define FAPPEND	O_APPEND
# define FFSYNC		O_FSYNC
# define FASYNC		O_ASYNC
# define FNONBLOCK	O_NONBLOCK
# define FNDELAY	O_NDELAY
#endif /* Use BSD.  */

/* Advise to `posix_fadvise'.  */
#ifdef __USE_XOPEN2K
# define POSIX_FADV_NORMAL	0 /* No further special treatment.  */
# define POSIX_FADV_RANDOM	1 /* Expect random page references.  */
# define POSIX_FADV_SEQUENTIAL	2 /* Expect sequential page references.	 */
# define POSIX_FADV_WILLNEED	3 /* Will need these pages.  */
# define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
# define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
#endif

#ifdef __USE_GNU 
/* Flags for SPLICE and VMSPLICE.  */
# define SPLICE_F_MOVE          1       /* Move pages instead of copying.  */
# define SPLICE_F_NONBLOCK      2       /* Don't block on the pipe splicing
                                           (but we may still block on the fd
                                           we splice from/to).  */
# define SPLICE_F_MORE          4       /* Expect more data.  */
# define SPLICE_F_GIFT          8       /* Pages passed in are a gift.  */
#endif


__BEGIN_DECLS

/* Provide kernel hint to read ahead.  */
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
    __THROW;

/* In-kernel implementation of tee for pipe buffers.  */
extern int tee (int __fdin, int __fdout, size_t __len, unsigned int __flags)
    __THROW;


__END_DECLS

[-- Attachment #4: fcntl_okay.h --]
[-- Type: text/x-chdr, Size: 7258 bytes --]

/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006
	Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */

/*
 *	POSIX Standard: 6.5 File Control Operations	<fcntl.h>
 */

#ifndef	_FCNTL_H
#define	_FCNTL_H	1

#include <features.h>

/* This must be early so <bits/fcntl.h> can define types winningly.  */
__BEGIN_DECLS

/* Get the definitions of O_*, F_*, FD_*: all the
   numbers and flag bits for `open', `fcntl', et al.  */
#include <bits/fcntl.h>

/* For XPG all symbols from <sys/stat.h> should also be available.  */
#ifdef __USE_XOPEN
# include <sys/stat.h>
#endif

#ifdef	__USE_MISC
# ifndef R_OK			/* Verbatim from <unistd.h>.  Ugh.  */
/* Values for the second argument to access.
   These may be OR'd together.  */
#  define R_OK	4		/* Test for read permission.  */
#  define W_OK	2		/* Test for write permission.  */
#  define X_OK	1		/* Test for execute permission.  */
#  define F_OK	0		/* Test for existence.  */
# endif
#endif /* Use misc.  */

/* XPG wants the following symbols.  */
#ifdef __USE_XOPEN		/* <stdio.h> has the same definitions.  */
# define SEEK_SET	0	/* Seek from beginning of file.  */
# define SEEK_CUR	1	/* Seek from current position.  */
# define SEEK_END	2	/* Seek from end of file.  */
#endif	/* XPG */

#ifdef __USE_ATFILE
# define AT_FDCWD		-100	/* Special value used to indicate
					   the *at functions should use the
					   current working directory. */
# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
# define AT_REMOVEDIR		0x200	/* Remove directory instead of
					   unlinking file.  */
# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
# define AT_EACCESS		0x200	/* Test access permitted for
					   effective IDs, not real IDs.  */
#endif

/* Do the file control operation described by CMD on FD.
   The remaining arguments are interpreted depending on CMD.

   This function is a cancellation point and therefore not marked with
   __THROW.  */
extern int fcntl (int __fd, int __cmd, ...);

/* Open FILE and return a new file descriptor for it, or -1 on error.
   OFLAG determines the type of access used.  If O_CREAT is on OFLAG,
   the third argument is taken as a `mode_t', the mode of the created file.

   This function is a cancellation point and therefore not marked with
   __THROW.  */
#ifndef __USE_FILE_OFFSET64
extern int open (__const char *__file, int __oflag, ...) __nonnull ((1));
#else
# ifdef __REDIRECT
extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64)
     __nonnull ((1));
# else
#  define open open64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));
#endif

#ifdef __USE_ATFILE
/* Similar to `open' but a relative path name is interpreted relative to
   the directory for which FD is a descriptor.

   NOTE: some other `openat' implementation support additional functionality
   through this interface, especially using the O_XATTR flag.  This is not
   yet supported here.

   This function is a cancellation point and therefore not marked with
   __THROW.  */
# ifndef __USE_FILE_OFFSET64
extern int openat (int __fd, __const char *__file, int __oflag, ...)
     __nonnull ((2));
# else
#  ifdef __REDIRECT
extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag,
				...), openat64) __nonnull ((2));
#  else
#   define openat openat64
#  endif
# endif

extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
     __nonnull ((2));
#endif

/* Create and open FILE, with mode MODE.  This takes an `int' MODE
   argument because that is what `mode_t' will be widened to.

   This function is a cancellation point and therefore not marked with
   __THROW.  */
#ifndef __USE_FILE_OFFSET64
extern int creat (__const char *__file, __mode_t __mode) __nonnull ((1));
#else
# ifdef __REDIRECT
extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode),
		       creat64) __nonnull ((1));
# else
#  define creat creat64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int creat64 (__const char *__file, __mode_t __mode) __nonnull ((1));
#endif

#if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
					       && !defined __USE_POSIX))
/* NOTE: These declarations also appear in <unistd.h>; be sure to keep both
   files consistent.  Some systems have them there and some here, and some
   software depends on the macros being defined without including both.  */

/* `lockf' is a simpler interface to the locking facilities of `fcntl'.
   LEN is always relative to the current file position.
   The CMD argument is one of the following.  */

# define F_ULOCK 0	/* Unlock a previously locked region.  */
# define F_LOCK  1	/* Lock a region for exclusive use.  */
# define F_TLOCK 2	/* Test and lock a region for exclusive use.  */
# define F_TEST  3	/* Test a region for other processes locks.  */

# ifndef __USE_FILE_OFFSET64
extern int lockf (int __fd, int __cmd, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
# else
#  define lockf lockf64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int lockf64 (int __fd, int __cmd, __off64_t __len);
# endif
#endif

#ifdef __USE_XOPEN2K
/* Advice the system about the expected behaviour of the application with
   respect to the file associated with FD.  */
# ifndef __USE_FILE_OFFSET64
extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
			  int __advise) __THROW;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,
					   __off64_t __len, int __advise),
			   posix_fadvise64);
# else
#  define posix_fadvise posix_fadvise64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
			    int __advise) __THROW;
# endif


/* Reserve storage for the data of the file associated with FD.

   This function is a possible cancellation points and therefore not
   marked with __THROW.  */
# ifndef __USE_FILE_OFFSET64
extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
					 __off64_t __len),
		       posix_fallocate64);
# else
#  define posix_fallocate posix_fallocate64
# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
# endif
#endif

__END_DECLS

#endif /* fcntl.h  */

[-- Attachment #5: bgxlc_r.man.gz --]
[-- Type: application/x-gzip, Size: 25650 bytes --]

[-- Attachment #6: float_with_-C.out --]
[-- Type: application/octet-stream, Size: 3446 bytes --]

#line 1 "/soft/apps/ibmcmp-jan2013/vac/bg/9.0/crt/include/float.h"
/**********************************************************************/
/*                                                                    */
/*   Licensed Materials - Property of IBM.                            */
/*   IBM XL C/C++ Advanced Edition for Blue Gene/P, V9.0              */
/*   5799-HJE                                                         */
/*   Copyright IBM Corp. 2007.                                        */
/*   All Rights Reserved.                                             */
/*   US Government Users Restricted Rights -                          */
/*   Use, duplication or disclosure restricted by                     */
/*   GSA ADP Schedule Contract with IBM Corp.                         */
/*                                                                    */
/**********************************************************************/
#line 17
/*
 *  ANSI required:
 *
 *      FLT_ROUNDS      Macro that returns current rounding mode value
 *      FLT_RADIX       Exponent radix
 *
 *               Values for "float" numbers
 *
 *      FLT_MANT_DIG    Number of bits in the significand
 *      FLT_EPSILON     1ulp when exponent = 0
 *      FLT_DIG         Number of decimal digits of precision
 *      FLT_MIN_EXP     Exponent of smallest NORMALIZED float number
 *      FLT_MIN         Smallest NORMALIZED float number
 *      FLT_MIN_10_EXP  Minimum base 10 exponent of NORMALIZED float
 *      FLT_MAX_EXP     Exponent of largest NORMALIZED float number
 *      FLT_MAX         Largest NORMALIZED float number
 *      FLT_MAX_10_EXP  Largest base 10 exponent of NORMALIZED float
 *
 *               Values for "double" numbers
 *
 *      DBL_MANT_DIG    Number of bits in the significand
 *      DBL_EPSILON     1ulp when exponent = 0
 *      DBL_DIG         Number of decimal digits of precision
 *      DBL_MIN_EXP     Exponent of smallest NORMALIZED double number
 *      DBL_MIN         Smallest NORMALIZED double number
 *      DBL_MIN_10_EXP  Minimum base 10 exponent of NORMALIZED double
 *      DBL_MAX_EXP     Exponent of largest NORMALIZED double number
 *      DBL_MAX         Largest NORMALIZED double number
 *      DBL_MAX_10_EXP  Largest base 10 exponent of NORMALIZED double
 *
 *                Values for "long double" numbers
 *
 *      LDBL_MANT_DIG   Number of bits in the significand
 *      LDBL_EPSILON    1ulp when unbiased exponent = 0
 *      LDBL_DIG        Number of decimal digits of precision
 *      LDBL_MIN_EXP    Exponent of smallest NORMALIZED long double number
 *      LDBL_MIN        Smallest NORMALIZED long double number
 *      LDBL_MIN_10_EX  Minimum base 10 exponent of NORMALIZED long double
 *      LDBL_MAX_EXP    Exponent of largest NORMALIZED long double number
 *      LDBL_MAX        Largest NORMALIZED long double number
 *      LDBL_MAX_10_EXP Largest base 10 exponent of NORMALIZED long double
 *
 */
#line 88
/*
 *      General definitions
 */
#line 103
/*
 *      Float definitions
 */
#line 125
/*
 *      Double definitions
 */
#line 147
/*
 *      Long Double definitions
 */
#line 174
/******************************************************************************
 *  This section is for Decimal Floating Point (DFP) items.
 *  DFP support is only present if __STDC_WANT_DEC_FP__ is defined.
 *****************************************************************************/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-11 18:11         ` Rhys Ulerich
@ 2013-10-11 18:25           ` Eric Blake
  2013-10-11 18:45             ` Rhys Ulerich
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Blake @ 2013-10-11 18:25 UTC (permalink / raw
  To: Rhys Ulerich; +Cc: Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 2909 bytes --]

On 10/11/2013 12:11 PM, Rhys Ulerich wrote:
> 
>> $ echo '#include <float.h>' > foo.c
>> $ bgxlc_r -E foo.c > float.out
> 
> This produces a zero-length float.out.  My user reports there's no
> float.h file sitting alongside other headers in the usual places.

Makes sense on two fronts - at least with gcc, <float.h> is managed by
the compiler and not by libc, so it lives in a compiler-specific
directory; furthermore, <float.h> has no function declarations (just
#defines), so a normal preprocessor run strips it so that there's
nothing left.  Meanwhile, adding -C no longer strips comments, so...

> 
>> We already special-case AIX, using a different mode of
>> '$CC -C -E' to make the preprocessed output more verbose; is there some
>> compiler switch for bgxlc_r (maybe -C, maybe some other spelling) that
>> makes the output more verbose?
> 
> Trying again with -C (documented in the attached man page, in case
> that's helpful at all) a la
> 
>> $ echo '#include <float.h>' > foo.c
>> $ bgxlc_r -C -E foo.c > float.out
> 
> produces the output attached as float_with_-C.out.

Hooray!  It begins with:
#line 1 "/soft/apps/ibmcmp-jan2013/vac/bg/9.0/crt/include/float.h"

so that should be enough for us.  Now we just need to modify the .m4
file to use -C whenever $CC is bgxlc_r.

Does this work for your user?  If so, I'll turn it into a formal commit.
 I'm a little bit hesitant to key off of $CC; what is $host_os for your
user?  (We can't blindly add -C to ALL platforms, but if all compilers
on the host that has bgxlc_r are likely to support -C, the way we did it
for AIX based solely on $host_os is nicer than trying to guess based on
compiler name).

diff --git i/m4/absolute-header.m4 w/m4/absolute-header.m4
index 89ff5be..8725e22 100644
--- i/m4/absolute-header.m4
+++ w/m4/absolute-header.m4
@@ -1,4 +1,4 @@
-# absolute-header.m4 serial 16
+# absolute-header.m4 serial 17
 dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -61,9 +61,10 @@ AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
   dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
   dnl and others. The workaround is to force preservation of comments
   dnl through option -C. This ensures all necessary #line directives
-  dnl are present. GCC supports option -C as well.
-  case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+  dnl are present. GCC supports option -C as well.  bgxlc_r on Intrepid
+  dnl has a similar failure for <float.h>, with a similar fix.
+  case $host_os:$CC in
+    aix*:* | *:bgxlc_r) gl_absname_cpp="$ac_cpp -C" ;;
     *)    gl_absname_cpp="$ac_cpp" ;;
   esac
 changequote(,)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-11 18:25           ` Eric Blake
@ 2013-10-11 18:45             ` Rhys Ulerich
  2013-10-11 19:05               ` Eric Blake
  0 siblings, 1 reply; 14+ messages in thread
From: Rhys Ulerich @ 2013-10-11 18:45 UTC (permalink / raw
  To: Eric Blake; +Cc: Gnulib Bugs

> Now we just need to modify the .m4
> file to use -C whenever $CC is bgxlc_r.

FWIW, the non-reentrant bgxlc behaves the same way as bgxlc_r with
respect to this float.h issue.  Probably worth using 'bgxlc*' for the
patch.

> Does this work for your user?

>  I'm a little bit hesitant to key off of $CC; what is $host_os for your user?

host_os='linux-gnu'

Based on the above two comments, I tweaked the patch to use
'linux*:bgxlc*' before trying it out.

I pulled gnulib, patched it with the diff modified to use
'linux*:bgxlc*', and then ran 'gnulib-tool --update' to try to snarf
it.  Then nothing happened.  And I noticed absolute-header.m4 isn't
populated in my project tree by gnulib-tool.  Does float_h.m4 make use
of it in some indirect way that's not jumping out at me?

- Rhys


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-11 18:45             ` Rhys Ulerich
@ 2013-10-11 19:05               ` Eric Blake
  2013-10-12  3:24                 ` Paul Eggert
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Blake @ 2013-10-11 19:05 UTC (permalink / raw
  To: Rhys Ulerich; +Cc: Paul Eggert, Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

On 10/11/2013 12:45 PM, Rhys Ulerich wrote:
> 
> I pulled gnulib, patched it with the diff modified to use
> 'linux*:bgxlc*', and then ran 'gnulib-tool --update' to try to snarf
> it.  Then nothing happened.  And I noticed absolute-header.m4 isn't
> populated in my project tree by gnulib-tool.  Does float_h.m4 make use
> of it in some indirect way that's not jumping out at me?

Huh.  I thought for sure the include-next module depended on
absolute-header; but a quick grep counters that fact.

Oh, I see - include_next.m4 inlines its OWN version of the absolute
header check, rather than reusing absolute-header.m4.  Can you munge the
patch to apply to include_next.m4 before testing?

Paul, any reason include_next.m4 doesn't reuse absolute-header.m4?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-11 19:05               ` Eric Blake
@ 2013-10-12  3:24                 ` Paul Eggert
  2013-12-04 17:27                   ` Eric Blake
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Eggert @ 2013-10-12  3:24 UTC (permalink / raw
  To: Eric Blake, Rhys Ulerich; +Cc: Gnulib Bugs

Eric Blake wrote:
> Paul, any reason include_next.m4 doesn't reuse absolute-header.m4?

Not that I recall.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-10-12  3:24                 ` Paul Eggert
@ 2013-12-04 17:27                   ` Eric Blake
  2013-12-04 17:38                     ` Rhys Ulerich
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Blake @ 2013-12-04 17:27 UTC (permalink / raw
  To: Paul Eggert, Rhys Ulerich; +Cc: Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

On 10/11/2013 09:24 PM, Paul Eggert wrote:
> Eric Blake wrote:
>> Paul, any reason include_next.m4 doesn't reuse absolute-header.m4?
> 
> Not that I recall.

Reviving this thread; I've fixed the code duplication, and now have only
one spot to work on to fix Rhys' original complaint.

http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/33475

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-12-04 17:27                   ` Eric Blake
@ 2013-12-04 17:38                     ` Rhys Ulerich
  2013-12-04 18:41                       ` Eric Blake
  0 siblings, 1 reply; 14+ messages in thread
From: Rhys Ulerich @ 2013-12-04 17:38 UTC (permalink / raw
  To: Eric Blake; +Cc: Paul Eggert, Gnulib Bugs

> Reviving this thread; I've fixed the code duplication, and now have only
> one spot to work on to fix Rhys' original complaint.

Thanks Eric.  Any tentative fix that I should ask my user to try out
on that BG system?  I'm unsure what to try in light of the reduced
duplication.

- Rhys


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-12-04 17:38                     ` Rhys Ulerich
@ 2013-12-04 18:41                       ` Eric Blake
  2013-12-12 16:26                         ` Rhys Ulerich
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Blake @ 2013-12-04 18:41 UTC (permalink / raw
  To: Rhys Ulerich; +Cc: Paul Eggert, Gnulib Bugs

[-- Attachment #1: Type: text/plain, Size: 1996 bytes --]

On 12/04/2013 10:38 AM, Rhys Ulerich wrote:
>> Reviving this thread; I've fixed the code duplication, and now have only
>> one spot to work on to fix Rhys' original complaint.
> 
> Thanks Eric.  Any tentative fix that I should ask my user to try out
> on that BG system?  I'm unsure what to try in light of the reduced
> duplication.

Yes, can you please try with latest gnulib.git plus this patch:

(I still wish there were a more reliable way to detect whether a
compiler supports -C alongside -E; I'm a bit worried about just probing
for whether it works, without knowing what behavior to expect from
compilers that don't support it, or worse support it but with a
different meaning than what gcc gives it)


diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index 89ff5be..ccd3c6c 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -1,4 +1,4 @@
-# absolute-header.m4 serial 16
+# absolute-header.m4 serial 17
 dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -61,9 +61,11 @@ AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
   dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
   dnl and others. The workaround is to force preservation of comments
   dnl through option -C. This ensures all necessary #line directives
-  dnl are present. GCC supports option -C as well.
-  case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+  dnl are present. GCC supports option -C as well.  Various Blue Gene
+  dnl compilers for Intrepid also support -C, needed for detecting
+  dnl when compiling for that system.
+  case $host_os:$CC in
+    aix*:* | *:bg* | *:blrts_*) gl_absname_cpp="$ac_cpp -C" ;;
     *)    gl_absname_cpp="$ac_cpp" ;;
   esac
 changequote(,)
-- 
1.8.3.1

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: Trouble with gnulib/float.h on Intrepid
  2013-12-04 18:41                       ` Eric Blake
@ 2013-12-12 16:26                         ` Rhys Ulerich
  0 siblings, 0 replies; 14+ messages in thread
From: Rhys Ulerich @ 2013-12-12 16:26 UTC (permalink / raw
  To: Eric Blake; +Cc: Paul Eggert, Gnulib Bugs

> Yes, can you please try with latest gnulib.git plus this patch...

We tried out the patch an no longer see empty include's (i.e. #include
"") appearing. I consider the original bug I reported as fixed.  Thank
you.

However, we see some headers including themselves (indirectly or
directly, I'm unsure) until the XL compilers complain after 255 levels
of recursive includes and bomb out.  There's something else amiss.  I
don't know if it's poor double inclusion guards in the system headers
or something else.  I'm afraid I've not got the time to chase it
further at the moment-- my wife had our second son six days ago.
If/when I can isolate something of interest, I'll start a new thread.

I appreciate your time and help,
Rhys


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-12-12 16:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 22:13 Trouble with gnulib/float.h on Intrepid Rhys Ulerich
2013-10-08 22:30 ` Eric Blake
2013-10-09 13:54   ` Rhys Ulerich
2013-10-09 21:45     ` Rhys Ulerich
2013-10-09 21:58       ` Eric Blake
2013-10-11 18:11         ` Rhys Ulerich
2013-10-11 18:25           ` Eric Blake
2013-10-11 18:45             ` Rhys Ulerich
2013-10-11 19:05               ` Eric Blake
2013-10-12  3:24                 ` Paul Eggert
2013-12-04 17:27                   ` Eric Blake
2013-12-04 17:38                     ` Rhys Ulerich
2013-12-04 18:41                       ` Eric Blake
2013-12-12 16:26                         ` Rhys Ulerich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).