mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	- fixed ptt_unix.c to work with the non blocking ttyd0 for now (on freebsd)
it was causing my grief with tx testing of OSS - fixed configure to fill in just start_oss.c for AUDIO git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@110 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									749577b6a1
								
							
						
					
					
						commit
						e7c229aed5
					
				
							
								
								
									
										6
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@ -2,7 +2,7 @@
 | 
				
			|||||||
# Guess values for system-dependent variables and create Makefiles.
 | 
					# Guess values for system-dependent variables and create Makefiles.
 | 
				
			||||||
# Generated by GNU Autoconf 2.53 for wsjt 0.9.
 | 
					# Generated by GNU Autoconf 2.53 for wsjt 0.9.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# $Id: configure.ac 100 2006-01-14 15:47:35Z va3db $
 | 
					# $Id: configure.ac 102 2006-01-14 16:15:50Z va3db $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 | 
					# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 | 
				
			||||||
# Free Software Foundation, Inc.
 | 
					# Free Software Foundation, Inc.
 | 
				
			||||||
@ -924,7 +924,7 @@ Free Software Foundation, Inc.
 | 
				
			|||||||
This configure script is free software; the Free Software Foundation
 | 
					This configure script is free software; the Free Software Foundation
 | 
				
			||||||
gives unlimited permission to copy, distribute and modify it.
 | 
					gives unlimited permission to copy, distribute and modify it.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$Id: configure.ac 100 2006-01-14 15:47:35Z va3db $
 | 
					$Id: configure.ac 102 2006-01-14 16:15:50Z va3db $
 | 
				
			||||||
_ACEOF
 | 
					_ACEOF
 | 
				
			||||||
  exit 0
 | 
					  exit 0
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
@ -5742,7 +5742,7 @@ cat >>confdefs.h <<\_ACEOF
 | 
				
			|||||||
#define USE_OSS 1
 | 
					#define USE_OSS 1
 | 
				
			||||||
_ACEOF
 | 
					_ACEOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	AUDIO="jtaudio.c start_oss.c"
 | 
						AUDIO="start_oss.c"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	CFLAGS="${CFLAGS} -DUSE_OSS"
 | 
						CFLAGS="${CFLAGS} -DUSE_OSS"
 | 
				
			||||||
	CPPFLAGS="${CPPFLAGS} -DUSE_OSS"
 | 
						CPPFLAGS="${CPPFLAGS} -DUSE_OSS"
 | 
				
			||||||
 | 
				
			|||||||
@ -239,15 +239,13 @@ if test "$alsa" = yes; then
 | 
				
			|||||||
	CPPFLAGS="${CPPFLAGS} -DUSE_ALSA"
 | 
						CPPFLAGS="${CPPFLAGS} -DUSE_ALSA"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl still not sure what OSS will require, but heres a first guess -db
 | 
					 | 
				
			||||||
if test "$oss" = yes; then
 | 
					if test "$oss" = yes; then
 | 
				
			||||||
	AC_DEFINE(USE_OSS, 1, [Define if you want OSS used.])
 | 
						AC_DEFINE(USE_OSS, 1, [Define if you want OSS used.])
 | 
				
			||||||
	AC_SUBST(AUDIO, "jtaudio.c start_oss.c")
 | 
						AC_SUBST(AUDIO, "start_oss.c")
 | 
				
			||||||
	CFLAGS="${CFLAGS} -DUSE_OSS"
 | 
						CFLAGS="${CFLAGS} -DUSE_OSS"
 | 
				
			||||||
	CPPFLAGS="${CPPFLAGS} -DUSE_OSS"
 | 
						CPPFLAGS="${CPPFLAGS} -DUSE_OSS"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl XXX
 | 
					 | 
				
			||||||
if test "$portaudio" = yes; then
 | 
					if test "$portaudio" = yes; then
 | 
				
			||||||
	AC_DEFINE(USE_PORTAUDIO, 1, [Define if you want PORTAUDIO used.])
 | 
						AC_DEFINE(USE_PORTAUDIO, 1, [Define if you want PORTAUDIO used.])
 | 
				
			||||||
	AC_SUBST(AUDIO, "a2d.f90 jtaudio.c start_portaudio.c")
 | 
						AC_SUBST(AUDIO, "a2d.f90 jtaudio.c start_portaudio.c")
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								ptt_unix.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								ptt_unix.c
									
									
									
									
									
								
							@ -19,7 +19,7 @@
 | 
				
			|||||||
 * for OSX. -db
 | 
					 * for OSX. -db
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#if defined(BSD)
 | 
					#if defined(BSD)
 | 
				
			||||||
#define TTYNAME "/dev/ttyd%d"
 | 
					#define TTYNAME "/dev/cuad%d"	/* Use non blocking form */
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#include <sys/io.h>
 | 
					#include <sys/io.h>
 | 
				
			||||||
#define TTYNAME	"/dev/ttyS%d"
 | 
					#define TTYNAME	"/dev/ttyS%d"
 | 
				
			||||||
@ -28,7 +28,8 @@
 | 
				
			|||||||
/* Not quite right for size but '%d + 1' should be plenty enough -db */
 | 
					/* Not quite right for size but '%d + 1' should be plenty enough -db */
 | 
				
			||||||
#define TTYNAME_SIZE	sizeof(TTYNAME)+1
 | 
					#define TTYNAME_SIZE	sizeof(TTYNAME)+1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int ptt_(int *nport, int *ntx, int *iptt)
 | 
					int
 | 
				
			||||||
 | 
					ptt_(int *nport, int *ntx, int *iptt)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  static int nopen=0;
 | 
					  static int nopen=0;
 | 
				
			||||||
  int control = TIOCM_RTS | TIOCM_DTR;
 | 
					  int control = TIOCM_RTS | TIOCM_DTR;
 | 
				
			||||||
@ -41,26 +42,25 @@ int ptt_(int *nport, int *ntx, int *iptt)
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(*ntx && (!nopen)) {
 | 
					  if(*ntx && (!nopen)) {
 | 
				
			||||||
    snprintf(s, TTYNAME_SIZE, TTYNAME, *nport);
 | 
					    snprintf(s, TTYNAME_SIZE, TTYNAME, (*nport) - 1);	/* Comport 1 == dev 0 */
 | 
				
			||||||
    s[TTYNAME_SIZE] = '\0';
 | 
					    s[TTYNAME_SIZE] = '\0';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //open the device
 | 
					    /* open the device */
 | 
				
			||||||
    if ((fd = open(s, O_RDWR | O_NDELAY)) < 0) {
 | 
					    if ((fd = open(s, O_RDWR | O_NDELAY)) < 0) {
 | 
				
			||||||
      fprintf(stderr, "device not found");
 | 
					      fprintf(stderr, "Can't open %s.", s);
 | 
				
			||||||
      return(1);
 | 
					      return(1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nopen=1;
 | 
					    nopen=1;
 | 
				
			||||||
    return(0);
 | 
					    return(0);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(*ntx && nopen) {
 | 
					  if(*ntx && nopen) {
 | 
				
			||||||
    //    printf("Set DTR/RTS   %d   %d\n",TIOCMBIS,control);
 | 
					 | 
				
			||||||
    ioctl(fd, TIOCMBIS, &control);               // Set DTR and RTS
 | 
					    ioctl(fd, TIOCMBIS, &control);               // Set DTR and RTS
 | 
				
			||||||
    *iptt=1;
 | 
					    *iptt=1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  else {
 | 
					  else {
 | 
				
			||||||
    //    printf("Clear DTR/RTS   %d   %d\n",TIOCMBIC,control);
 | 
					 | 
				
			||||||
    ioctl(fd, TIOCMBIC, &control);
 | 
					    ioctl(fd, TIOCMBIC, &control);
 | 
				
			||||||
    close(fd);
 | 
					    close(fd);
 | 
				
			||||||
    *iptt=0;
 | 
					    *iptt=0;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user