Thu Apr 15 00:50:03 2010 UTC ()
From Jess Thrysoee: add ifndef around def of _GNU_SOURCE


(christos)
diff -r1.45 -r1.46 src/lib/libedit/histedit.h

cvs diff -r1.45 -r1.46 src/lib/libedit/histedit.h (expand / switch to unified diff)

--- src/lib/libedit/histedit.h 2010/01/03 18:27:10 1.45
+++ src/lib/libedit/histedit.h 2010/04/15 00:50:03 1.46
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: histedit.h,v 1.45 2010/01/03 18:27:10 christos Exp $ */ 1/* $NetBSD: histedit.h,v 1.46 2010/04/15 00:50:03 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1992, 1993 4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Christos Zoulas of Cornell University. 8 * Christos Zoulas of Cornell University.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -238,28 +238,30 @@ typedef struct tokenizer Tokenizer; @@ -238,28 +238,30 @@ typedef struct tokenizer Tokenizer;
238Tokenizer *tok_init(const char *); 238Tokenizer *tok_init(const char *);
239void tok_end(Tokenizer *); 239void tok_end(Tokenizer *);
240void tok_reset(Tokenizer *); 240void tok_reset(Tokenizer *);
241int tok_line(Tokenizer *, const LineInfo *, 241int tok_line(Tokenizer *, const LineInfo *,
242 int *, const char ***, int *, int *); 242 int *, const char ***, int *, int *);
243int tok_str(Tokenizer *, const char *, 243int tok_str(Tokenizer *, const char *,
244 int *, const char ***); 244 int *, const char ***);
245 245
246/* 246/*
247 * Begin Wide Character Support 247 * Begin Wide Character Support
248 */ 248 */
249#ifdef __linux__ 249#ifdef __linux__
250/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */ 250/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */
 251#ifndef _GNU_SOURCE
251#define _GNU_SOURCE 252#define _GNU_SOURCE
252#endif 253#endif
 254#endif
253 255
254#include <wchar.h> 256#include <wchar.h>
255#include <wctype.h> 257#include <wctype.h>
256 258
257/* 259/*
258 * Wide character versions 260 * Wide character versions
259 */ 261 */
260 262
261/* 263/*
262 * ==== Editing ==== 264 * ==== Editing ====
263 */ 265 */
264typedef struct lineinfow { 266typedef struct lineinfow {
265 const wchar_t *buffer; 267 const wchar_t *buffer;