Just one last file that will not commpile on OS X. Bascically another char is not wxChar thing. Here is the patch to fix that:
# diff -c macsercomm.cpp macsercomm.cpp.DIST
*** macsercomm.cpp Sat Jul 3 19:32:17 2010
--- macsercomm.cpp.DIST Sat Jul 3 19:30:08 2010
***************
*** 65,71 ****
m_fileDescriptor = open(m_pszPortName, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (m_fileDescriptor == -1)
{
! wxLogMessage( (const wxChar*)"Error opening
serial port %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
return false ;
}
--- 65,71 ----
m_fileDescriptor = open(m_pszPortName, O_RDWR | O_NOCTTY | O_NONBLOCK);
if (m_fileDescriptor == -1)
{
! wxLogMessage("Error opening
serial port %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
return false ;
}
***************
*** 77,83 ****
if (ioctl(m_fileDescriptor, TIOCEXCL) == -1)
{
! wxLogMessage( (const wxChar*)"Error setting TIOCEXCL on %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
--- 77,83 ----
if (ioctl(m_fileDescriptor, TIOCEXCL) == -1)
{
! wxLogMessage("Error setting TIOCEXCL on %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
***************
*** 92,98 ****
if (fcntl(m_fileDescriptor, F_SETFL, 0) == -1)
{
! wxLogMessage( (const wxChar*)"Error clearing O_NONBLOCK %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
--- 92,98 ----
if (fcntl(m_fileDescriptor, F_SETFL, 0) == -1)
{
! wxLogMessage("Error clearing O_NONBLOCK %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
***************
*** 105,111 ****
// Get the
current options and save them so we can restore the default settings later.
if (tcgetattr(m_fileDescriptor, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage( (const wxChar*)"Error getting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
--- 105,111 ----
// Get the
current options and save them so we can restore the default settings later.
if (tcgetattr(m_fileDescriptor, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage("Error getting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
if (m_fileDescriptor != -1)
{
***************
*** 135,141 ****
// See tcsendbreak(3) ("man 3 tcsendbreak") for details.
if (tcdrain(m_fileDescriptor) == -1)
{
! wxLogMessage( (const wxChar*)"Error waiting for drain - %s(%d).\n",
strerror(errno), errno);
}
--- 135,141 ----
// See tcsendbreak(3) ("man 3 tcsendbreak") for details.
if (tcdrain(m_fileDescriptor) == -1)
{
! wxLogMessage("Error waiting for drain - %s(%d).\n",
strerror(errno), errno);
}
***************
*** 144,150 ****
// was saved.
if (tcsetattr(m_fileDescriptor, TCSANOW, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage( (const wxChar*)"Error resetting tty attributes - %s(%d).\n",
strerror(errno), errno);
}
close(m_fileDescriptor);
--- 144,150 ----
// was saved.
if (tcsetattr(m_fileDescriptor, TCSANOW, &m_OriginalTTYAttrs) == -1)
{
! wxLogMessage("Error resetting tty attributes - %s(%d).\n",
strerror(errno), errno);
}
close(m_fileDescriptor);
***************
*** 178,185 ****
// Print the current input and output baud rates.
// See tcsetattr(4) ("man 4 tcsetattr") for details.
! wxLogMessage( (const wxChar*)"Current input baud rate is %d\n", (int) cfgetispeed(&options));
! wxLogMessage( (const wxChar*)"Current output baud rate is %d\n", (int) cfgetospeed(&options));
// Set raw input (non-canonical) mode, with reads blocking until either a
single character
// has been received or a one second timeout expires.
--- 178,185 ----
// Print the current input and output baud rates.
// See tcsetattr(4) ("man 4 tcsetattr") for details.
! wxLogMessage("Current input baud rate is %d\n", (int) cfgetispeed(&options));
! wxLogMessage("Current output baud rate is %d\n", (int) cfgetospeed(&options));
// Set raw input (non-canonical) mode, with reads blocking until either a
single character
// has been received or a one second timeout expires.
***************
*** 202,214 ****
// the current baud rate if the IOSSIOSPEED ioctl was used but will instead return the speed set by the last call
// to cfsetspeed.
! wxLogMessage( (const wxChar*)"Input baud rate changed to %d\n", (int) cfgetispeed(&options));
! wxLogMessage( (const wxChar*)"Output baud rate changed to %d\n", (int) cfgetospeed(&options));
// Cause the new options to take effect immediately.
if (tcsetattr(m_fileDescriptor, TCSANOW, &options) == -1)
{
! wxLogMessage( (const wxChar*)"Error setting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
goto error;
}
--- 202,214 ----
// the current baud rate if the IOSSIOSPEED ioctl was used but will instead return the speed set by the last call
// to cfsetspeed.
! wxLogMessage("Input baud rate changed to %d\n", (int) cfgetispeed(&options));
! wxLogMessage("Output baud rate changed to %d\n", (int) cfgetospeed(&options));
// Cause the new options to take effect immediately.
if (tcsetattr(m_fileDescriptor, TCSANOW, &options) == -1)
{
! wxLogMessage("Error setting tty attributes %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
goto error;
}
***************
*** 218,230 ****
if (ioctl(m_fileDescriptor, TIOCSDTR) == -1) // Assert Data Terminal Ready (DTR)
{
! wxLogMessage( (const wxChar*)"Error asserting DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
if (ioctl(m_fileDescriptor, TIOCCDTR) == -1) // Clear Data Terminal Ready (DTR)
{
! wxLogMessage( (const wxChar*)"Error clearing DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
--- 218,230 ----
if (ioctl(m_fileDescriptor, TIOCSDTR) == -1) // Assert Data Terminal Ready (DTR)
{
! wxLogMessage("Error asserting DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
if (ioctl(m_fileDescriptor, TIOCCDTR) == -1) // Clear Data Terminal Ready (DTR)
{
! wxLogMessage("Error clearing DTR %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
***************
*** 232,238 ****
if (ioctl(m_fileDescriptor, TIOCMSET, &handshake) == -1)
// Set the
modem lines depending on the bits set in handshake
{
! wxLogMessage( (const wxChar*)"Error setting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
--- 232,238 ----
if (ioctl(m_fileDescriptor, TIOCMSET, &handshake) == -1)
// Set the
modem lines depending on the bits set in handshake
{
! wxLogMessage("Error setting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
***************
*** 242,252 ****
if (ioctl(m_fileDescriptor, TIOCMGET, &handshake) == -1)
// Store the state of the modem lines in handshake
{
! wxLogMessage( (const wxChar*)"Error getting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
! wxLogMessage( (const wxChar*)"Handshake lines currently set to %d\n", handshake);
// Success
return m_fileDescriptor;
--- 242,252 ----
if (ioctl(m_fileDescriptor, TIOCMGET, &handshake) == -1)
// Store the state of the modem lines in handshake
{
! wxLogMessage("Error getting handshake lines %s - %s(%d).\n",
m_pszPortName, strerror(errno), errno);
}
! wxLogMessage("Handshake lines currently set to %d\n", handshake);
// Success
return m_fileDescriptor;
***************
*** 285,295 ****
if (numBytes == -1)
{
! wxLogMessage( (const wxChar*)"Error writing to modem - %s(%d).\n", strerror(errno), errno);
}
else
{
! wxLogMessage( (const wxChar*)"Wrote %ld bytes\n", numBytes);
}
}
return bool(numBytes == dwSize) ;
--- 285,295 ----
if (numBytes == -1)
{
! wxLogMessage("Error writing to modem - %s(%d).\n", strerror(errno), errno);
}
else
{
! wxLogMessage("Wrote %ld bytes\n", numBytes);
}
}
return bool(numBytes == dwSize) ;