Add config.h to include/hamlib so HAVE_PTHREAD is available if needed

https://github.com/Hamlib/Hamlib/issues/947
pull/954/head
Mike Black W9MDB 2022-02-03 22:31:42 -06:00
rodzic 1bc9c0da79
commit 9aade8de3f
14 zmienionych plików z 17 dodań i 32 usunięć

Wyświetl plik

@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <config.h> #include <hamlib/config.h>
#include <ltdl.h> #include <ltdl.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <stdio.h> #include <stdio.h>

Wyświetl plik

@ -18,7 +18,7 @@ AC_INIT([Hamlib],[4.5~git],[hamlib-developer@lists.sourceforge.net],[hamlib],[ht
AC_CONFIG_SRCDIR([include/hamlib/rig.h]) AC_CONFIG_SRCDIR([include/hamlib/rig.h])
AC_CONFIG_MACRO_DIR([macros]) AC_CONFIG_MACRO_DIR([macros])
AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_HEADERS([include/hamlib/config.h])
dnl Place build system provided programs in this directory. dnl Place build system provided programs in this directory.
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])

Wyświetl plik

@ -1,6 +1,6 @@
noinst_HEADERS = config.h bandplan.h num_stdio.h noinst_HEADERS = bandplan.h num_stdio.h
nobase_include_HEADERS = hamlib/rig.h hamlib/riglist.h hamlib/rig_dll.h \ nobase_include_HEADERS = hamlib/rig.h hamlib/riglist.h hamlib/rig_dll.h \
hamlib/rotator.h hamlib/rotlist.h hamlib/rigclass.h \ hamlib/rotator.h hamlib/rotlist.h hamlib/rigclass.h \
hamlib/rotclass.h hamlib/amplifier.h hamlib/amplist.h \ hamlib/rotclass.h hamlib/amplifier.h hamlib/amplist.h \
hamlib/ampclass.h hamlib/ampclass.h hamlib/config.h

Wyświetl plik

@ -36,7 +36,7 @@
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "hamlib/config.h"
#endif #endif
#ifdef HAVE_PTHREAD #ifdef HAVE_PTHREAD
#include <pthread.h> #include <pthread.h>
@ -2555,7 +2555,7 @@ struct rig_state {
hamlib_port_t rigport; /*!< Rig port (internal use). */ hamlib_port_t rigport; /*!< Rig port (internal use). */
hamlib_port_t pttport; /*!< PTT port (internal use). */ hamlib_port_t pttport; /*!< PTT port (internal use). */
hamlib_port_t dcdport; /*!< DCD port (internal use). */ hamlib_port_t dcdport; /*!< DCD port (internal use). */
#ifdef _PTHREAD_H #ifdef HAVE_PTHREAD
pthread_mutex_t mutex_set_transaction; pthread_mutex_t mutex_set_transaction;
#endif #endif
/********* DO NOT ADD or CHANGE anything (or than to rename) ABOVE THIS LINE *********/ /********* DO NOT ADD or CHANGE anything (or than to rename) ABOVE THIS LINE *********/

Wyświetl plik

@ -1,9 +1,7 @@
#ifndef _ASYNC_PIPE_H #ifndef _ASYNC_PIPE_H
#define _ASYNC_PIPE_H 1 #define _ASYNC_PIPE_H 1
#ifdef HAVE_CONFIG_H #include "hamlib/config.h"
# include "config.h"
#endif
#if defined(WIN32) && defined(HAVE_WINDOWS_H) #if defined(WIN32) && defined(HAVE_WINDOWS_H)

Wyświetl plik

@ -1,5 +1,5 @@
#include <config.h> #include <hamlib/config.h>
#ifdef HAVE_WINDOWS_H #ifdef HAVE_WINDOWS_H
#include <windows.h> #include <windows.h>

Wyświetl plik

@ -1,7 +1,5 @@
#ifdef HAVE_CONFIG_H #include <hamlib/rig.h>
#include "hamlib/rig.h" #include <hamlib/config.h>
#include <config.h>
#endif
#if defined(WIN32) && !defined(HAVE_TERMIOS_H) #if defined(WIN32) && !defined(HAVE_TERMIOS_H)

Wyświetl plik

@ -16,7 +16,7 @@ This file is part of the GNU C Library.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <config.h> #include <hamlib/config.h>
#ifndef HAVE_USLEEP #ifndef HAVE_USLEEP

Wyświetl plik

@ -22,9 +22,7 @@
#ifndef _TUNER_H #ifndef _TUNER_H
#define _TUNER_H 1 #define _TUNER_H 1
#ifdef HAVE_CONFIG_H #include "hamlib/config.h"
#include "config.h"
#endif
/* /*
* So far, only Linux has Video4Linux support through ioctl :) * So far, only Linux has Video4Linux support through ioctl :)
* until someone port it to some other OS... * until someone port it to some other OS...

Wyświetl plik

@ -22,9 +22,7 @@
#ifndef _WINRADIO_H #ifndef _WINRADIO_H
#define _WINRADIO_H 1 #define _WINRADIO_H 1
#ifdef HAVE_CONFIG_H #include "hamlib/config.h"
#include "config.h"
#endif
#define BACKEND_VER "20110822" #define BACKEND_VER "20110822"
/* /*

Wyświetl plik

@ -25,7 +25,7 @@
#include <hamlib/rig.h> #include <hamlib/rig.h>
#include <hamlib/rotator.h> #include <hamlib/rotator.h>
#include <hamlib/amplifier.h> #include <hamlib/amplifier.h>
#include <config.h> #include <hamlib/config.h>
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN_C extern "C" #define EXTERN_C extern "C"

Wyświetl plik

@ -50,9 +50,7 @@
*/ */
#include "hamlib/rig.h" #include "hamlib/rig.h"
#ifdef HAVE_CONFIG_H #include "hamlib/config.h"
# include "config.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -2626,7 +2624,6 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
ELAPSED1; ELAPSED1;
ENTERFUNC; ENTERFUNC;
rig_debug(RIG_DEBUG_ERR, "%s: rig->state.pttport.type.ptt=%d, %p\n", __func__, rig->state.pttport.type.ptt, &rig->state.pttport.type.ptt);
if (CHECK_RIG_ARG(rig)) if (CHECK_RIG_ARG(rig))
{ {

Wyświetl plik

@ -19,9 +19,7 @@
*/ */
#ifdef HAVE_CONFIG_H #include <hamlib/config.h>
# include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

Wyświetl plik

@ -18,9 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* *
*/ */
#ifdef HAVE_CONFIG_H #include <hamlib/config.h>
# include <config.h>
#endif
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>