Commit [091d95] Maximize Restore History

Automatically detect and configure for cross compiling.

Keith Marshall Keith Marshall 2005-10-05

added tools
added tools/Makefile.in
added tools/configure
added tools/configure.ac
changed ChangeLog
changed Makefile.in
changed aclocal.m4
changed configure
changed configure.ac
changed msgs
changed msgs/Makefile.in
changed msgs/README
changed src
changed src/Makefile.in
copied src/makemsg.c -> tools/makemsg.c
tools
Directory.
tools/Makefile.in Diff Switch to side-by-side view
Loading...
tools/configure Diff Switch to side-by-side view
Loading...
tools/configure.ac Diff Switch to side-by-side view
Loading...
ChangeLog Diff Switch to side-by-side view
Loading...
Makefile.in Diff Switch to side-by-side view
Loading...
aclocal.m4 Diff Switch to side-by-side view
Loading...
configure Diff Switch to side-by-side view
Loading...
configure.ac Diff Switch to side-by-side view
Loading...
msgs
Directory.
msgs/Makefile.in Diff Switch to side-by-side view
Loading...
msgs/README Diff Switch to side-by-side view
Loading...
src
Directory.
src/Makefile.in Diff Switch to side-by-side view
Loading...
src/makemsg.c to tools/makemsg.c
--- a/src/makemsg.c
+++ b/tools/makemsg.c
@@ -18,23 +18,38 @@
  *	makemsg -c input message_catalog
  */
 
-#include "compat.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <stdio.h>
 #ifdef HAVE_STDLIB_H
-#include <stdlib.h>
+# include <stdlib.h>
 #endif
 
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
 #endif
 
 #ifdef __QNX__
-#include <unix.h>
+# include <unix.h>
 #endif
 
 #ifdef HAVE_STRING_H
-#include <string.h>
+# include <string.h>
+ /*
+  * Prefer `strchr' and `strrchr' to `index' and `rindex',
+  * when we have them.
+  */
+
+# ifdef HAVE_STRCHR
+#  define index  strchr
+# endif
+
+# ifdef HAVE_STRRCHR
+#  define rindex strrchr
+# endif
+
 #else
 extern char *index(const char *, int);
 extern char *rindex(const char *, int);