r17061 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17060‎ | r17061 | r17062 >
Date:01:33, 17 October 2006
Author:river
Status:old
Tags:
Comment:
reorganise source
Modified paths:
  • /trunk/willow/configure.in (modified) (history)
  • /trunk/willow/mk/vars.mk.in (modified) (history)
  • /trunk/willow/src/Makefile.in (modified) (history)
  • /trunk/willow/src/bin (deleted) (history)
  • /trunk/willow/src/include/willow.h (modified) (history)

Diff [purge]

Index: trunk/willow/configure.in
@@ -16,7 +16,7 @@
1717 debug_cflags_sunpro="-g $sunpro_common -v -xs"
1818 prod_cflags_sunpro="-fast $sunpro_common -xdepend=yes -xipo=2 -xalias_level=std"
1919
20 -AC_CONFIG_HEADER(config.h)
 20+AC_CONFIG_HEADER(src/include/config.h)
2121
2222 echo ""
2323 echo "examining environment..."
@@ -55,16 +55,9 @@
5656
5757 AC_PROG_INSTALL
5858 AC_MAKE_INCLUDE
59 -AC_PATH_PROG([YACC], [yacc],none)
60 -if test x$YACC = xnone; then
61 - AC_MSG_ERROR([you don't have yacc])
62 -fi
 59+AC_PROG_YACC
 60+AC_PROG_LEX
6361
64 -AC_PATH_PROG([LEX], [lex],none)
65 -if test x$LEX = xnone; then
66 - AC_MSG_ERROR([you don't have lex])
67 -fi
68 -
6962 dependstyle=null
7063
7164 AC_CHECK_PROG(have_makedepend, makedepend, yes, no)
@@ -137,6 +130,14 @@
138131 datadir="${datadir}/willow"
139132 CFLAGS="$USE_CFLAGS"
140133
 134+
 135+PATH_LIBEXECDIR=`eval echo $libexecdir | sed -e "s,NONE,$prefix,"`
 136+PATH_DATADIR=`eval echo $datadir`
 137+PATH_SYSCONFDIR=`eval echo $sysconfdir`
 138+AC_DEFINE_UNQUOTED([LIBEXECDIR], ["$PATH_LIBEXECDIR"], [Path to libexec dir])
 139+AC_DEFINE_UNQUOTED([DATADIR], ["$PATH_DATADIR"], [Path to data dir])
 140+AC_DEFINE_UNQUOTED([SYSCONFDIR], ["$PATH_SYSCONFDIR"], [Path to sysconf dir])
 141+
141142 AC_OUTPUT(
142143 mk/prog.mk
143144 mk/lib.mk
@@ -150,10 +151,6 @@
151152 mk/Makefile
152153 Makefile
153154 src/Makefile
154 - src/bin/Makefile
155 - src/bin/willow/Makefile
156 - src/bin/wlogwriter/Makefile
157 - src/lib/Makefile
158 - src/lib/wnet/Makefile
159 - src/lib/wlog/Makefile
 155+ src/willow/Makefile
 156+ src/wlogwriter/Makefile
160157 errors/Makefile)
Index: trunk/willow/mk/vars.mk.in
@@ -12,7 +12,7 @@
1313 _YACC= @YACC@
1414
1515 CC= @CC@
16 -_CPPFLAGS= -I@abs_top_srcdir@ -I. -I@abs_top_srcdir@/src/include @CPPFLAGS@
 16+_CPPFLAGS= @CPPFLAGS@
1717 _CFLAGS= @CFLAGS@
1818 _LDFLAGS= @LDFLAGS@ @LIBS@
1919
Index: trunk/willow/src/Makefile.in
@@ -2,7 +2,7 @@
33 #
44 # src/ makefile.
55
6 -SUBDIRS=lib bin
 6+SUBDIRS=willow wlogwriter
77
88 @include@ @q@@top_srcdir@/mk/subdir.mk@q@
99
Index: trunk/willow/src/include/willow.h
@@ -63,11 +63,18 @@
6464 # pragma does_not_return(outofmemory)
6565 #endif
6666
67 -#define safe_snprintf(n,a) if (snprintf a > (n - 1)) abort();
6867 #define min(x,y) ((x) < (y) ? (x) : (y))
6968
7069 #define CHAR_HOST 1
7170
7271 extern int char_table[];
7372
 73+#if defined(__GNUC__) || defined(__INTEL_COMPILER)
 74+# define likely(c) __builtin_expect((c), 1)
 75+# define unlikely(c) __buildin_expect((c), 0)
 76+#else
 77+# define likely(c) c
 78+# define unlikely(c) c
7479 #endif
 80+
 81+#endif