ncurses.patch 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. NCurses determines the presence of the <stdbool.h> header during its
  2. own build time but the result is used in a public header <curses.h>.
  3. It cannot be assumed that the application building against this public
  4. header <curses.h> also uses the same compiler NCurses was built with.
  5. Hence the public header <curses.h> has to perform an own in-place check
  6. for <stdbool.h>. This way NCurses can be build with OpenPKG's GCC 3.x
  7. while an application could build against the provided <curses.h> with an
  8. arbitrary C compiler (usually a non-GCC 3.x vendor compiler!).
  9. Index: include/curses.h.in
  10. --- include/curses.h.in.orig 2004-02-22 09:36:58.000000000 +0100
  11. +++ include/curses.h.in 2004-02-22 09:37:14.000000000 +0100
  12. @@ -61,7 +61,11 @@
  13. * User-definable tweak to disable the include of <stdbool.h>.
  14. */
  15. #ifndef NCURSES_ENABLE_STDBOOL_H
  16. -#define NCURSES_ENABLE_STDBOOL_H @cf_cv_header_stdbool_h@
  17. +#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) && !defined(__osf__)
  18. +#define NCURSES_ENABLE_STDBOOL_H 1
  19. +#else
  20. +#define NCURSES_ENABLE_STDBOOL_H 0
  21. +#endif
  22. #endif
  23. /*
  24. Index: ncurses/Makefile.in
  25. --- ncurses/Makefile.in.orig Wed Dec 22 13:02:27 2004
  26. +++ ncurses/Makefile.in Wed Dec 22 13:02:30 2004
  27. @@ -273,7 +273,8 @@
  28. @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS)
  29. lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
  30. - ../@DFT_OBJ_SUBDIR@/dump_entry$o
  31. + ../@DFT_OBJ_SUBDIR@/dump_entry$o \
  32. + ../@DFT_OBJ_SUBDIR@/comp_parse$o
  33. @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
  34. link_test$x : link_test.c $(TEST_DEPS) \
  35. Index: progs/Makefile.in
  36. --- progs/Makefile.in.orig Sat Nov 1 23:45:57 2003
  37. +++ progs/Makefile.in Wed Dec 22 13:04:07 2004
  38. @@ -192,7 +192,8 @@
  39. DEPS_TIC = \
  40. $(MODEL)/tic$o \
  41. - $(MODEL)/dump_entry$o
  42. + $(MODEL)/dump_entry$o \
  43. + $(MODEL)/comp_parse$o
  44. tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
  45. @ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
  46. @@ -211,14 +212,16 @@
  47. @ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_DEFAULT) -o $@
  48. DEPS_TPUT = \
  49. - $(MODEL)/tput$o
  50. + $(MODEL)/tput$o \
  51. + $(MODEL)/lib_tparm$o
  52. tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
  53. @ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
  54. DEPS_INFOCMP = \
  55. $(MODEL)/infocmp$o \
  56. - $(MODEL)/dump_entry$o
  57. + $(MODEL)/dump_entry$o \
  58. + $(MODEL)/comp_parse$o
  59. infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
  60. @ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_DEFAULT) -o $@
  61. Index: test/Makefile.in
  62. --- test/Makefile.in.orig Sun Dec 7 02:36:16 2003
  63. +++ test/Makefile.in Wed Dec 22 13:04:47 2004
  64. @@ -147,7 +147,7 @@
  65. @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/color_set$o $(LDFLAGS_DEFAULT)
  66. demo_defkey$x: $(MODEL)/demo_defkey$o $(LOCAL_LIBS)
  67. - @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_defkey$o $(LDFLAGS_CURSES)
  68. + @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_defkey$o $(MODEL)/key_defined$o $(LDFLAGS_CURSES)
  69. demo_forms$x: $(MODEL)/demo_forms$o $(MODEL)/edit_field$o $(LOCAL_LIBS)
  70. @ECHO_LINK@ $(LINK) -o $@ $(MODEL)/demo_forms$o $(MODEL)/edit_field$o $(LDFLAGS_DEFAULT)