Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Build failure sim/rx on OSX.
@ 2010-01-30  2:23 Masaki Muranaka
  2010-02-01  7:19 ` Joel Brobecker
  2010-02-02  1:43 ` DJ Delorie
  0 siblings, 2 replies; 8+ messages in thread
From: Masaki Muranaka @ 2010-01-30  2:23 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

Hello maintainers,

There are three issues on sim/rx.
1. A committer have forgot run autoheader.
2. There doesn't use config.h in main.c.
3. We should check if the host has getopt.h

The attached patch is enough to build on OSX host.
It's possible there are another issues around portability there.

Thanks,

sim/rx/ChangeLog
2010-01-30  Masaki Muranaka  <monaka@monami-software.com>

        * configure.in: Check if the host has getopt.h.
        * configure.in: Regenerate.
        * config.in: Regenerate.
        * main.c: Include config.h
	  Use HAVE_STDLIB_H, HAVE_UNISTD_H, HAVE_GETOPT_H.
	  Include getopt.h in case HAVE_GETOPT_H is defined.

--
Masaki Muranaka
Monami software


[-- Attachment #2: rx-sim-host-osx.diff --]
[-- Type: application/octet-stream, Size: 4576 bytes --]

diff --git a/sim/rx/config.in b/sim/rx/config.in
index e69de29..f71c45f 100644
--- a/sim/rx/config.in
+++ b/sim/rx/config.in
@@ -0,0 +1,107 @@
+/* config.in.  Generated from configure.in by autoheader.  */
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <fpu_control.h> header file. */
+#undef HAVE_FPU_CONTROL_H
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getrusage' function. */
+#undef HAVE_GETRUSAGE
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the `time' function. */
+#undef HAVE_TIME
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if you have the `__setfpucw' function. */
+#undef HAVE___SETFPUCW
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Additional package description */
+#undef PKGVERSION
+
+/* Bug reporting address */
+#undef REPORT_BUGS_TO
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
diff --git a/sim/rx/configure b/sim/rx/configure
index 58e42de..56d03ac 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -4517,6 +4517,19 @@ sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
 sim_link_links="${sim_link_links} targ-vals.def"
 
 
+for ac_header in getopt.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETOPT_H 1
+_ACEOF
+
+fi
+
+done
+
+
 
 ac_sources="$sim_link_files"
 ac_dests="$sim_link_links"
diff --git a/sim/rx/configure.in b/sim/rx/configure.in
index c97270a..7c51815 100644
--- a/sim/rx/configure.in
+++ b/sim/rx/configure.in
@@ -21,6 +21,7 @@ dnl
 AC_PREREQ(2.5)dnl
 AC_INIT(Makefile.in)
 AC_CONFIG_HEADER(config.h:config.in)
+AC_CHECK_HEADERS(getopt.h)
 
 sinclude(../common/aclocal.m4)
 
diff --git a/sim/rx/main.c b/sim/rx/main.c
index 350c7ae..a83794e 100644
--- a/sim/rx/main.c
+++ b/sim/rx/main.c
@@ -19,13 +19,21 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <assert.h>
 #include <setjmp.h>
 #include <signal.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
 
 #include "bfd.h"
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-02-14  7:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-30  2:23 [patch] Build failure sim/rx on OSX Masaki Muranaka
2010-02-01  7:19 ` Joel Brobecker
2010-02-01  7:29   ` Masaki Muranaka
2010-02-01  7:58     ` Joel Brobecker
2010-02-14  6:53       ` Masaki Muranaka
2010-02-14  7:40   ` Masaki Muranaka
2010-02-02  1:43 ` DJ Delorie
2010-02-02  2:57   ` Masaki Muranaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox