[netcf-devel] [PATCH 5/5] Conditionalize Windows portion

Eric Blake eblake at redhat.com
Thu Sep 23 11:57:29 UTC 2010


On 09/23/2010 03:21 AM, Daniel P. Berrange wrote:
> On Wed, Sep 22, 2010 at 02:17:48PM -0600, Eric Blake wrote:
>> On 09/17/2010 10:29 AM, Adam Stokes wrote:
>>> ---
>>>    src/drv_initscripts.c |    2 +-
>>>    src/internal.h        |    3 ++
>>>    src/ncftool.c         |    7 ++++++
>>>    src/netcf.c           |   54 ++++++++++++++++++++++++++++++++++++++++++++++++-
>>>    src/xslt_ext.c        |    2 +-
>>>    5 files changed, 65 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/src/drv_initscripts.c b/src/drv_initscripts.c
>>> index c0bcfd5..2127d2a 100644
>>> --- a/src/drv_initscripts.c
>>> +++ b/src/drv_initscripts.c
>>> @@ -100,7 +100,7 @@ static const struct augeas_xfm_table augeas_xfm_iptables =
>>>
>>>    static const char *const prog_lokkit = "/usr/sbin/lokkit";
>>>    static const char *const lokkit_custom_rules =
>>> -    "--custom-rules=ipv4:filter:" DATADIR "/netcf/iptables-forward-bridged";
>>> +    "--custom-rules=ipv4:filter:" NETCF_DATADIR "/netcf/iptables-forward-bridged";
>>
>> I still don't see why you had to do this rename.  A commit comment
>> explaining why would be great, and it may be possible to do things
>> without a rename.
>
> Win32 header files already have something called DATADIR defined :-(

But with the gnulib module configmake, can we instead do:

#include <windows.h>
#undef DATADIR // Nuke the broken windows definition
#include "configmake.h"

at which point DATADIR is perfectly safe for the same definition we are 
already used to?

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


More information about the netcf-devel mailing list