[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fts: remove redundant macro definitions
From: |
Bruno Haible |
Subject: |
fts: remove redundant macro definitions |
Date: |
Tue, 2 Jan 2007 21:58:18 +0100 |
User-agent: |
KMail/1.9.1 |
Hi Jim,
Now that gnulib-tool defines GNULIB_FTS when the fts module is in use, and
GNULIB_FTS_LGPL when the fts-lgpl module is in use, the _LGPL_PACKAGE macro
is redundant. Here is a proposed patch:
2007-01-01 Bruno Haible <address@hidden>
* m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
* lib/fts_.h (_LGPL_PACKAGE): Remove macro.
Use !GNULIB_FTS instead of _LGPL_PACKAGE.
* lib/fts.c: Likewise.
*** m4/fts.m4.bak 2006-08-22 14:50:23.000000000 +0200
--- m4/fts.m4 2007-01-01 15:46:01.000000000 +0100
***************
*** 1,5 ****
! #serial 11
! dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- 1,5 ----
! #serial 12
! dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
***************
*** 12,20 ****
AC_DEFUN([gl_FUNC_FTS_LGPL],
[
AC_REQUIRE([gl_FUNC_FTS_CORE])
- AC_DEFINE([_LGPL_PACKAGE], 1,
- [Define to 1 if compiling for a package to be distributed under the
- GNU Lesser Public License.])
])
AC_DEFUN([gl_FUNC_FTS_CORE],
--- 12,17 ----
*** lib/fts_.h.bak 2006-11-21 02:59:27.000000000 +0100
--- lib/fts_.h 2007-01-01 16:23:11.000000000 +0100
***************
*** 1,6 ****
/* Traverse a file hierarchy.
! Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- 1,6 ----
/* Traverse a file hierarchy.
! Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
***************
*** 52,58 ****
# ifdef _LIBC
# include <features.h>
- # define _LGPL_PACKAGE 1
# else
# undef __THROW
# define __THROW
--- 52,57 ----
***************
*** 142,148 ****
# define FTS_STOP 0x2000 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
! # if !_LGPL_PACKAGE
union {
/* This data structure is used if FTS_TIGHT_CYCLE_CHECK is
specified. It records the directories between a starting
--- 141,147 ----
# define FTS_STOP 0x2000 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
! # if GNULIB_FTS
union {
/* This data structure is used if FTS_TIGHT_CYCLE_CHECK is
specified. It records the directories between a starting
*** lib/fts.c.bak 2006-12-09 19:47:45.000000000 +0100
--- lib/fts.c 2007-01-01 16:23:06.000000000 +0100
***************
*** 1,6 ****
/* Traverse a file hierarchy.
! Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- 1,6 ----
/* Traverse a file hierarchy.
! Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
***************
*** 150,162 ****
static int fts_safe_changedir (FTS *, FTSENT *, int, const char *)
internal_function;
! #if _LGPL_PACKAGE
static bool enter_dir (FTS *fts, FTSENT *ent) { return true; }
static void leave_dir (FTS *fts, FTSENT *ent) {}
static bool setup_dir (FTS *fts) { return true; }
static void free_dir (FTS *fts) {}
- #else
- # include "fts-cycle.c"
#endif
#ifndef MAX
--- 150,162 ----
static int fts_safe_changedir (FTS *, FTSENT *, int, const char *)
internal_function;
! #if GNULIB_FTS
! # include "fts-cycle.c"
! #else
static bool enter_dir (FTS *fts, FTSENT *ent) { return true; }
static void leave_dir (FTS *fts, FTSENT *ent) {}
static bool setup_dir (FTS *fts) { return true; }
static void free_dir (FTS *fts) {}
#endif
#ifndef MAX
***************
*** 1403,1409 ****
return (p->fts_level == FTS_ROOTLEVEL ? FTS_D :
FTS_DOT);
}
! #if _LGPL_PACKAGE
{
/*
* Cycle detection is done by brute force when the directory
--- 1403,1409 ----
return (p->fts_level == FTS_ROOTLEVEL ? FTS_D :
FTS_DOT);
}
! #if !GNULIB_FTS
{
/*
* Cycle detection is done by brute force when the directory
- fts: remove redundant macro definitions,
Bruno Haible <=