darwin support

Darwin's tty's are funky in two ways:

* tty's will block until carrier is detected unless you pass O_NDELAY
* poll is broken.

Signed-off-by: Erik Gilling <konkers@android.com>
Don't print '.' for bell character

Add a new valid state -1 to ignore characters without printing a '.',
and use the new state for the bell character (ASCII code 7).
Add .gitignore

Add a .gitignore file to ignore .o files and the final target.
Merge pull request #2 from colincross/master

Don't print bell character and add .gitignore
Add 57600 baud rate
Merge pull request #3 from machinaut/patch-1

Add 57600 baud rate
don't map LF to CRLF on output
Switch the serial port to blocking after opening

The serial port must be opened non-blocking to avoid waiting for
carrier detect during open, but leaving it set to non-blocking
causes later writes to fail with "Resource temporarily unavailable".
Switch the fd back to blocking mode after opening.
Merge pull request #4 from colincross/master

Switch the serial port to blocking after opening