bug-bash
[Top][All Lists]
Advanced

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

Re: builtins.h missing include guard


From: Chet Ramey
Subject: Re: builtins.h missing include guard
Date: Wed, 19 Apr 2017 09:14:26 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 4/19/17 5:30 AM, Pierre Gaston wrote:
> I'm toying with loadable builtins and I noticed that builtins.h does not
> have include guard.

That's true, and I can add one.  But it's not included by any other
headers, so it's up to you to include it once.

> 
> Basically I needed the definition of WORLD_LIST and I was using (not sure
> if there is a better way):
> 
> #include <config.h>
> #include <builtins.h>
> #include <shell.h>

You can do it the way the example "loadables.h" does:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "builtins.h"
#include "shell.h"
#include "bashgetopt.h"
#include "common.h"


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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