bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] getstr(), readline()


From: Bruno Haible
Subject: [Bug-gnulib] getstr(), readline()
Date: Tue, 31 Dec 2002 13:59:16 +0100 (CET)

Hi,

I made this change. If a module from gnulib is used by other programs, it
should better not clash with other libraries. (A few months ago, we had a
clash between hash_insert() in librecode and libphp. Not a funny experience.)


2002-12-22  Bruno Haible  <address@hidden>

        * getstr.h (getstr): Define, to avoid clash with libcurses.
        * linebuffer.h (readline): Define, to avoid clash with libreadline.

diff -r -c3 gnulib-cvs/lib/getstr.h gnulib/lib/getstr.h
*** gnulib-cvs/lib/getstr.h     2000-06-21 11:09:57.000000000 +0200
--- gnulib/lib/getstr.h 2002-12-22 15:13:34.000000000 +0100
***************
*** 11,16 ****
--- 11,19 ----
  #  endif
  # endif
  
+ /* Avoid collision with getstr() from libcurses.  */
+ #define getstr getdelim2
+ 
  int
  getstr PARAMS ((char **lineptr, size_t *n, FILE *stream,
                int delim1, int delim2,
diff -r -c3 gnulib-cvs/lib/linebuffer.h gnulib/lib/linebuffer.h
*** gnulib-cvs/lib/linebuffer.h 2000-08-07 17:48:18.000000000 +0200
--- gnulib/lib/linebuffer.h     2002-12-22 15:17:21.000000000 +0100
***************
*** 1,5 ****
  /* linebuffer.h -- declarations for reading arbitrarily long lines
!    Copyright (C) 1986, 1991, 1998, 1999 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,5 ----
  /* linebuffer.h -- declarations for reading arbitrarily long lines
!    Copyright (C) 1986, 1991, 1998, 1999, 2002 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
***************
*** 35,40 ****
--- 35,43 ----
  #  endif
  # endif
  
+ /* Avoid collision with readline() from libreadline.  */
+ #define readline readlinebuffer
+ 
  /* Initialize linebuffer LINEBUFFER for use. */
  void initbuffer PARAMS ((struct linebuffer *linebuffer));
  



reply via email to

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