add 300 baudrate support to linux
add support for 300 baudrate to Windows and Lua bindings also
Add funcionality which allows getting the associated port fd/HANDLE.

Sometimes it's handy (sometimes dangerous) to get handle/file descriptor
associated with the serial port.
- version 1.0.2
- added 460800 baudrate
- fixed memory leak in rs232_end() if the port wasn't open
- update year in the copyright
- sync debug message print format between win/Linux
fix the obvious error in the rs232_test.c

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Added libmath to the linker flags when compiling test for llua

When trying to compile the test-program for the library, libmath is not in
the linker flags for some reason:

	./configure --host=arm-linux-gnu
	--with-lua-inc=/path/lua-5.1.4/included
	--with-lua-lib=/path/lua-5.1.4/lib

        configure: WARNING:
        *** Lua (>=5.0) headers and/or librairies couldn't be found in your system.
        *** Try to install liblua, liblualib and liblua-dev with your software

	configure:11664: gcc -o conftest -g -O2
	-I/path/lua-5.1.4/src
	-I/path/lua-5.1.4/src
	-L/path/lua-5.1.4/lib conftest.c
	-llua >&5

	In function `Arith':
	lvm.c:(.text+0x458): undefined reference to `pow'

Signed-off-by: Anders Palm <ap@swtech.dk>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Convert all Linux bits to Posix and add define for 460800 baudrate

- rename all Linux bits to Posix, to make it clear, that is (should) work on
  any Posix system
- sprinkle a bit of BSD into device names and examples
- added define for a non-standard badurate 460800

Signed-off-by: Jasper Lievisse Adriaanse <jasper@humppa.nl>
Signed-off-by: Petr Stetiar <ynezz@true.cz>
tweak .gitignore and autogen.sh little bit, remove my local build.sh

Signed-off-by: Petr Štetiar <ynezz@true.cz>
move ifdefed inclusion of the platform specific headers into rs232.h

Signed-off-by: Petr Štetiar <ynezz@true.cz>
bindings/lua: silence gcc 4.6 warning about unused but set variable

luars232.c: In function 'lua_port_read':
luars232.c:144:6: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]

Which I don't clearly understand, but well...

Signed-off-by: Petr Štetiar <ynezz@true.cz>
remove sysincludedir variable from the pkg-config file

This variable isn't expanding now anymore (obsolete?) and pkg-config complains
about it.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
add debug output for Windows also

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Lua: fix wrong return value passed from read()

Thanks to taka-wang for this fix.

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Windows: make read() return timeout error

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Version 1.0.3

Signed-off-by: Petr Stetiar <ynezz@true.cz>
rs232_test: fix memory leak

if rs232_init() return successfully then you must call rs232_end() before terminate program.
Merge pull request #7 from mkilivan/master

rs232_test: fix memory leak
wince: fix device name and update vs project

On Windows CE "standard" device name format \\.\COMx doesn't work, CreateFile()
just expects another standard name "COM1:" (note the ':' character).

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Merge remote-tracking branch 'upstream/master'

* upstream/master:
  wince: fix device name and update vs project
  rs232_test: fix memory leak
  Version 1.0.3
  Windows: make read() return timeout error
  Lua: fix wrong return value passed from read()
  add debug output for Windows also
  remove sysincludedir variable from the pkg-config file
  bindings/lua: silence gcc 4.6 warning about unused but set variable
  move ifdefed inclusion of the platform specific headers into rs232.h
  tweak .gitignore and autogen.sh little bit, remove my local build.sh
  Convert all Linux bits to Posix and add define for 460800 baudrate
  Added libmath to the linker flags when compiling test for llua
  fix the obvious error in the rs232_test.c
  - version 1.0.2 - added 460800 baudrate - fixed memory leak in rs232_end() if the port wasn't open - update year in the copyright - sync debug message print format between win/Linux
  Add funcionality which allows getting the associated port fd/HANDLE.
  add support for 300 baudrate to Windows and Lua bindings also
  add 300 baudrate support to linux
Update to 1.0.3