This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [common] Merge duplicated macros in linux-nat.c and linux-low.c


> Date: Fri, 18 Feb 2011 22:41:26 +0800
> From: Yao Qi <yao@codesourcery.com>

> +#include <sys/ptrace.h>
> +

You only include <sys/ptrace.h> in this header file, but...

> +
> +#ifndef O_LARGEFILE
> +#define O_LARGEFILE 0
> +#endif
> +
> +/* We can't always assume that this flag is available, but all systems
> +   with the ptrace event handlers also have __WALL, so it's safe to use
> +   in some contexts.  */
> +#ifndef __WALL
> +#define __WALL          0x40000000 /* Wait for any child.  */
> +#endif

...I don't think O_LARGEFILE and __WALL are declared in that header
file.  I wonder if you should also include <fcntl.h> and <sys/wait.h>
here, to make sure you don't accidentally define them to some bogus
value when the Linux system does provide the proper defines for them.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]