Fixes ticket:134. Unlikely offender was inclusion of
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 30 Jan 2007 03:59:34 +0000 (03:59 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 30 Jan 2007 03:59:34 +0000 (03:59 +0000)
gr_udp_sink/source code io.i.  omnithread.h was also including
<config.h> which is a no-no.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4333 221aa14e-8319-0410-a670-987f0aec2ac5

config/gr_omnithread.m4
configure.ac
gnuradio-core/src/lib/io/io.i
omnithread/omnithread.h

index bdf1ecea40331f92c9ca1e9396c0a166da0c5fc1..1c1ef699a8bb1e45c48a395d786b930fd4180d95 100644 (file)
@@ -1,6 +1,6 @@
 # Check for Omnithread (pthread/NT) thread support.             -*- Autoconf -*-
 
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003,2007 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ AC_DEFUN([GR_OMNITHREAD],
   # Check first for POSIX
   ACX_PTHREAD(
   [ ot_posix="yes"
-    AC_DEFINE(OMNITHREAD_POSIX,[1],[Define to 1 to enable pthread])
+    DEFINES="$DEFINES -DOMNITHREAD_POSIX=1"
   ],[
     # If no POSIX support found, then check for NT threads
     AC_MSG_CHECKING([for NT threads])
@@ -34,7 +34,7 @@ AC_DEFUN([GR_OMNITHREAD],
       ],
       [ 
         ot_nt="yes"
-       AC_DEFINE(OMNITHREAD_NT,[1],[Define to 1 to enable NT thread])
+        DEFINES="$DEFINES -DOMNITHREAD_NT=1"
       ],
       [AC_MSG_FAILURE([GNU Radio requires POSIX threads.  pthreads not found.])]
     )
index 7fc963c392ecbf7a172dd879a5132c2bb2679f12..d934c5c35afa546e9b0d38d7ff6cea69ac5d15c6 100644 (file)
@@ -25,6 +25,9 @@ AC_CANONICAL_TARGET([])
 AM_INIT_AUTOMAKE(gnuradio,3.0svn)
 AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
 
+DEFINES=""
+AC_SUBST(DEFINES)
+
 dnl Remember if the user explicity set CXXFLAGS
 if test -n "${CXXFLAGS}"; then
   user_set_cxxflags=yes
@@ -173,9 +176,6 @@ dnl Define where to find boost includes
 dnl defines BOOST_CFLAGS
 GR_REQUIRE_BOOST_INCLUDES
 
-DEFINES=""
-AC_SUBST(DEFINES)
-
 dnl Component specific configuration
 dnl The order of the GR_ macros determines the order of compilation
 AC_ARG_ENABLE(
index e6ed4c6a158084872b25e18ce2633a195ca117d1..7baf94ef026fbbc87b6d2b8a7dbfefc6c1f5fc18 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2007 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -34,8 +34,8 @@
 #include <ppio.h>
 #include <gr_message_source.h>
 #include <gr_message_sink.h>
-#include <gr_udp_sink.cc>
-#include <gr_udp_source.cc>
+#include <gr_udp_sink.h>
+#include <gr_udp_source.h>
 
 %}
 
index b6df34d72eccf9f6f87a7a38a24de9029180383e..bd916561e1f366057dd7c2ed53cbbe346fbc854c 100644 (file)
@@ -73,7 +73,7 @@ class omni_thread;
 //
 
 #if !defined(OMNITHREAD_POSIX) && !defined(OMNITHREAD_NT) && defined HAVE_CONFIG_H
-#include <config.h>
+// #include <config.h>      // No, No, No!  Never include <config.h> from a header
 #endif
 
 #if defined(OMNITHREAD_POSIX)