home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / utils / bug / 2449 < prev    next >
Encoding:
Text File  |  1993-01-25  |  2.1 KB  |  73 lines

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!icule.UUCP!pinard
  2. From: pinard@icule.UUCP (Francois Pinard)
  3. Newsgroups: gnu.utils.bug
  4. Subject: lib/error.c and lib/xmalloc.c improvements
  5. Date: 25 Jan 1993 20:12:48 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 59
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gnu-utils@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301230331.AA04084@icule.UUCP>
  12. Reply-To: pinard@iro.umontreal.ca
  13.  
  14. Hi, people.
  15.  
  16. Comparing GNU text utilities 1.4's lib directory with the routines I
  17. sometimes distribute, I realize that lib/error.c and lib/xmalloc.c are
  18. lacking the conditionnal inclusion of "config.h".  Could this be added
  19. to the common version?
  20.  
  21. Also, various malloc's do not behave regularily when given 0 as
  22. argument.  xmalloc will abort if malloc returns NULL.  What about
  23. xmalloc returning NULL without calling malloc, whenever given 0 as
  24. argument?
  25.  
  26. Reversed diffs follow:
  27.  
  28. ---------------------------------------------------------------------->
  29. /usr0/tmp/textutils-1.4/lib) diff -u ~/3/libgnu .
  30. diff -u /usr2/pinard/3/libgnu/error.c ./error.c
  31. --- /usr2/pinard/3/libgnu/error.c    Fri Jan  1 17:22:39 1993
  32. +++ ./error.c    Sat Jul 18 14:23:10 1992
  33. @@ -17,10 +17,6 @@
  34.  
  35.  /* Written by David MacKenzie.  */
  36.  
  37. -#ifdef HAVE_CONFIG_H
  38. -#include "config.h"
  39. -#endif
  40. -
  41.  #include <stdio.h>
  42.  
  43.  #ifdef HAVE_VPRINTF
  44. --- /usr2/pinard/3/libgnu/xmalloc.c    Fri Jan  1 17:25:54 1993
  45. +++ ./xmalloc.c    Sat Jul 18 14:27:23 1992
  46. @@ -15,10 +15,6 @@
  47.     along with this program; if not, write to the Free Software
  48.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  49.  
  50. -#ifdef HAVE_CONFIG_H
  51. -#include "config.h"
  52. -#endif
  53. -
  54.  #ifdef STDC_HEADERS
  55.  #include <stdlib.h>
  56.  #else
  57. @@ -37,8 +33,6 @@
  58.  {
  59.    char *p;
  60.  
  61. -  if (n == 0)
  62. -    return 0;
  63.    p = malloc (n);
  64.    if (p == 0)
  65.      /* Must exit with 2 for `cmp'.  */
  66. ----------------------------------------------------------------------<
  67.  
  68. -- 
  69. Franc,ois Pinard        ``Vivement GNU!''       pinard@iro.umontreal.ca
  70. (514) 588-4656                                   ...!uunet!iros1!pinard
  71. About the League for Programming Freedom?  Email me or lpf@uunet.uu.net
  72.  
  73.