bug-gnulib
[Top][All Lists]
Advanced

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

Re: fts: remove redundant macro definitions


From: Bruno Haible
Subject: Re: fts: remove redundant macro definitions
Date: Mon, 8 Jan 2007 22:23:51 +0100
User-agent: KMail/1.9.1

> 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.

I applied this instead.

2007-01-08  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.
        * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.

diff -c -3 -r1.32 fts.c
*** lib/fts.c   8 Jan 2007 10:32:58 -0000       1.32
--- lib/fts.c   8 Jan 2007 21:25:25 -0000
***************
*** 162,174 ****
  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
--- 162,174 ----
  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
***************
*** 1405,1411 ****
                        return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : 
FTS_DOT);
                }
  
! #if _LGPL_PACKAGE
                {
                  /*
                   * Cycle detection is done by brute force when the directory
--- 1405,1411 ----
                        return (p->fts_level == FTS_ROOTLEVEL ? FTS_D : 
FTS_DOT);
                }
  
! #if !GNULIB_FTS
                {
                  /*
                   * Cycle detection is done by brute force when the directory
diff -c -3 -r1.8 fts_.h
*** lib/fts_.h  12 Nov 2006 17:35:39 -0000      1.8
--- lib/fts_.h  8 Jan 2007 21:25:26 -0000
***************
*** 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
diff -c -3 -r1.10 fts.m4
*** m4/fts.m4   21 Aug 2006 21:46:31 -0000      1.10
--- m4/fts.m4   8 Jan 2007 21:25:26 -0000
***************
*** 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 ----
diff -c -3 -r1.11 fts
*** modules/fts 12 Nov 2006 17:35:39 -0000      1.11
--- modules/fts 8 Jan 2007 21:25:26 -0000
***************
*** 22,27 ****
--- 22,28 ----
  
  configure.ac:
  gl_FUNC_FTS
+ gl_MODULE_INDICATOR([fts])
  
  Makefile.am:
  




reply via email to

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