[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs configure qe.h
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs configure qe.h |
Date: |
Sat, 23 Nov 2013 10:55:20 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 13/11/23 10:55:20
Modified files:
. : configure qe.h
Log message:
- added test for texi2html install to control doc build
- added config variable CONFIG_HAS_TYPEOF
- improved qe_free type checking with typeof
- fixed gcc 4.4.5 warning on strict anti-aliasing breakage
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/configure?cvsroot=qemacs&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.97&r2=1.98
Patches:
Index: configure
===================================================================
RCS file: /sources/qemacs/qemacs/configure,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- configure 22 Nov 2013 20:45:09 -0000 1.17
+++ configure 23 Nov 2013 10:55:20 -0000 1.18
@@ -157,6 +157,10 @@
fi
fi
+if test -z `which texi2html` ; then
+ doc="no"
+fi
+
for opt do
value="none"
case "$opt" in
@@ -373,6 +377,19 @@
gcc_major="3"
fi
+# check typeof support
+cat > $TMPC <<EOF
+int main(int argc, char **argv) {
+ typeof(**argv) **a = argv;
+ return *a != 0;
+}
+EOF
+
+has_typeof="no"
+if $cc -o $TMPO $TMPC 2> /dev/null ; then
+ has_typeof="yes"
+fi
+
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat << EOF
@@ -457,6 +474,10 @@
echo "TARGET_ARCH_POWERPC=yes" >> $TMPMAK
echo "#define ARCH_POWERPC 1" >> $TMPH
fi
+if test "$has_typeof" = "yes" ; then
+ echo "CONFIG_HAS_TYPEOF=yes" >> $TMPMAK
+ echo "#define CONFIG_HAS_TYPEOF 1" >> $TMPH
+fi
if test "$bigendian" = "yes" ; then
echo "WORDS_BIGENDIAN=yes" >> $TMPMAK
echo "#define WORDS_BIGENDIAN 1" >> $TMPH
Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- qe.h 22 Nov 2013 20:50:20 -0000 1.97
+++ qe.h 23 Nov 2013 10:55:20 -0000 1.98
@@ -101,8 +101,12 @@
#define qe_mallocz_array(t, n) ((t *)qe_mallocz_bytes((n) * sizeof(t)))
#define qe_malloc_hack(t, n) ((t *)qe_malloc_bytes(sizeof(t) + (n)))
#define qe_mallocz_hack(t, n) ((t *)qe_mallocz_bytes(sizeof(t) + (n)))
+#ifdef CONFIG_HAS_TYPEOF
+#define qe_free(pp) do { typeof(**(pp)) **__ = (pp); free(*__); *__ =
NULL; } while (0)
+#else
#define qe_free(pp) \
do if (sizeof(**(pp)) >= 0) { void *_ = (pp); free(*(void **)_); *(void
**)_ = NULL; } while (0)
+#endif
/************************/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs configure qe.h,
Charlie Gordon <=