浏览代码

replace configure time check for stdbool.h with compile time check

Michael van Elst 23 年之前
父节点
当前提交
4a5184da7d
共有 2 个文件被更改,包括 31 次插入1 次删除
  1. 28 0
      ncurses/ncurses.patch
  2. 3 1
      ncurses/ncurses.spec

+ 28 - 0
ncurses/ncurses.patch

@@ -0,0 +1,28 @@
+--- include/curses.h.in.dist	2003-07-30 15:13:01.000000000 +0200
++++ include/curses.h.in	2003-07-30 15:15:08.000000000 +0200
+@@ -115,6 +115,9 @@
+  * Otherwise, let it remain a typedef to avoid conflicts with other #define's.
+  * In either case, make a typedef for NCURSES_BOOL which can be used if needed
+  * from either C or C++.
++ *
++ * We have <stdbool.h> if and only if we are a ISO C 9x compiler. A configure
++ * time check is not sufficient.
+  */
+ 
+ #undef TRUE
+@@ -127,13 +130,13 @@
+ 
+ #if @USE_CXX_BOOL@ /* !__cplusplus, etc. */
+ 
+-#if @cf_cv_header_stdbool_h@
++#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
+ #include <stdbool.h>
+ #endif
+ 
+ #undef bool
+ 
+-#if @cf_cv_header_stdbool_h@
++#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
+ #define bool NCURSES_BOOL
+ #else
+ typedef NCURSES_BOOL bool;

+ 3 - 1
ncurses/ncurses.spec

@@ -68,7 +68,7 @@ Distribution: OpenPKG [BASE]
 Group:        Terminal
 License:      GPL
 Version:      %{V_base}.%{V_patchL}
-Release:      20030727
+Release:      20030730
 
 #   list of sources
 Source0:      ftp://invisible-island.net/ncurses/ncurses-%{V_base}.tar.gz
@@ -102,6 +102,7 @@ Patch26:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V
 Patch27:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch27}.patch.gz
 Patch28:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch28}.patch.gz
 Patch29:      ftp://invisible-island.net/ncurses/%{V_base}/ncurses-%{V_base}-%{V_patch29}.patch.gz
+Patch30:      ncurses.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -129,6 +130,7 @@ AutoReqProv:  no
     do
         %{l_gzip} -d -c $patchfile | %{l_patch} -p1 || true
     done
+    %patch30
 
 %build
     CC="%{l_cc}" \