home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / utils / bug / 2305 < prev    next >
Encoding:
Text File  |  1993-01-01  |  1.3 KB  |  48 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!twinsun.COM!eggert
  3. From: eggert@twinsun.COM (Paul Eggert)
  4. Subject: oleo 1.2 xrdb.c doesn't configure alloca properly
  5. Message-ID: <9301011737.AA03402@farside.twinsun.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Fri, 1 Jan 1993 17:37:38 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 35
  12.  
  13. oleo 1.2 (gcc 2.3.3 -ansi -pedantic, SunOS 4.1.2) doesn't build properly
  14. because xrdb.c uses alloca without defining it.  The problem is that xrdb.c
  15. doesn't configure alloca properly.  Here's a patch.
  16.  
  17. *** xrdb.c    1992/12/31 15:54:06    1.2.1.1
  18. --- xrdb.c    1992/12/31 16:04:32    1.2.1.2
  19. ***************
  20. *** 19,24 ****
  21. --- 19,43 ----
  22.   /* Coopted for oleo -t 12/92 */
  23.   /* Written by jla, 4/90 */
  24.   
  25. + #ifndef alloca
  26. + #ifdef __GNUC__
  27. + #define alloca __builtin_alloca
  28. + #else /* __GNUC__ not defined.  */
  29. + #if HAVE_ALLOCA_H
  30. + #include <alloca.h>
  31. + #else /* not HAVE_ALLOCA_H */
  32. + #if defined (MSDOS) && !defined (__TURBOC__)
  33. + #include <malloc.h>
  34. + #else /* not MSDOS, or __TURBOC__ */
  35. + #if defined(_AIX)
  36. + #include <malloc.h>
  37. +  #pragma alloca
  38. + #endif /* not _AIX */
  39. + #endif /* not MSDOS, or __TURBOC__ */
  40. + #endif /* not HAVE_ALLOCA_H */
  41. + #endif /* __GNUC__ not defined.  */
  42. + #endif /* alloca not defined.  */
  43.   #ifdef emacs
  44.   #include "config.h"
  45.   #endif
  46.  
  47.