]> sigrok.org Git - libserialport.git/log
libserialport.git
9 years agoBuild: Use GNUMAKEFLAGS and $@
Daniel Elstner [Thu, 10 Sep 2015 20:03:07 +0000 (22:03 +0200)]
Build: Use GNUMAKEFLAGS and $@

9 years agoautogen.sh: Create autostuff/ dir if it does not exist
Daniel Elstner [Thu, 27 Aug 2015 09:46:06 +0000 (11:46 +0200)]
autogen.sh: Create autostuff/ dir if it does not exist

9 years agoconfigure: Enable largefile support on 32-bit systems
Daniel Elstner [Wed, 26 Aug 2015 20:49:40 +0000 (22:49 +0200)]
configure: Enable largefile support on 32-bit systems

9 years agoClean up .gitignore
Daniel Elstner [Wed, 26 Aug 2015 20:01:03 +0000 (22:01 +0200)]
Clean up .gitignore

9 years agoBuild: Clean up configure.ac and Makefile.am
Daniel Elstner [Wed, 26 Aug 2015 19:42:32 +0000 (21:42 +0200)]
Build: Clean up configure.ac and Makefile.am

Among other things, rename some config defines so we can take
advantage of standard Autoconf macros.

9 years agoBuild: Reduce autogen.sh to trivial stub
Daniel Elstner [Wed, 26 Aug 2015 17:46:43 +0000 (19:46 +0200)]
Build: Reduce autogen.sh to trivial stub

Use autoreconf instead of invoking the various Auto tools
separately. Get rid of the Darwin-specific guesswork -- it does
not make sense to handle this at the level of libserialport.

People should set up their ACLOCAL_PATH themselves as appropriate
for their own system; just as they already need to set up various
other paths.

9 years agoUpdate copyright notices.
Martin Ling [Sun, 31 May 2015 12:07:20 +0000 (13:07 +0100)]
Update copyright notices.

9 years agoUpdate AUTHORS file.
Martin Ling [Sun, 31 May 2015 11:32:21 +0000 (12:32 +0100)]
Update AUTHORS file.

9 years agoNEWS: Update for the upcoming 0.1.1 release.
Uwe Hermann [Sat, 30 May 2015 20:04:56 +0000 (22:04 +0200)]
NEWS: Update for the upcoming 0.1.1 release.

9 years agodoc: Provided channel is binary, not necessarily 8-bit.
Martin Ling [Sat, 30 May 2015 20:03:38 +0000 (21:03 +0100)]
doc: Provided channel is binary, not necessarily 8-bit.

9 years agoFix possible use of uninitialised variable in poll() setup.
Martin Ling [Wed, 27 May 2015 10:21:56 +0000 (11:21 +0100)]
Fix possible use of uninitialised variable in poll() setup.

9 years agodoc: Additional introductory text.
Martin Ling [Wed, 27 May 2015 09:53:46 +0000 (10:53 +0100)]
doc: Additional introductory text.

9 years agodoc: Expanded introductory text.
Martin Ling [Sun, 24 May 2015 12:47:38 +0000 (13:47 +0100)]
doc: Expanded introductory text.

9 years agodoc: Additional notes on sp_last_error_{code,message}.
Martin Ling [Sun, 24 May 2015 12:47:09 +0000 (13:47 +0100)]
doc: Additional notes on sp_last_error_{code,message}.

9 years agoHandle the case when /sys/class/tty/ entries are not symlinks.
silverbuddy [Wed, 20 May 2015 12:51:47 +0000 (15:51 +0300)]
Handle the case when /sys/class/tty/ entries are not symlinks.

For example:

$ uname -a
Linux RT-N66U 2.6.22.19 #1 Thu Feb 12 20:33:36 CST 2015 mips GNU/Linux

$ ls -lF /sys/class/tty/
drwxr-xr-x    2 foo  root             0 May 18 18:12 ttyACM0/

$ ls -lF /sys/class/tty/ttyACM0/
-r--r--r--    1 foo  root          4096 May 18 18:12 dev
lrwxrwxrwx    1 foo  root             0 May 18 18:12 device -> ../../../devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1.1/1-1.1:1.0/
lrwxrwxrwx    1 foo  root             0 May 18 18:12 subsystem -> ../../../class/tty/
-rw-r--r--    1 foo  root          4096 May 18 18:12 uevent

9 years agoAdd new sp_blocking_read_next() function.
Martin Ling [Thu, 7 May 2015 09:07:55 +0000 (10:07 +0100)]
Add new sp_blocking_read_next() function.

9 years agowindows: Always check and set ReadTotalTimeoutMultiplier.
Martin Ling [Thu, 7 May 2015 09:06:33 +0000 (10:06 +0100)]
windows: Always check and set ReadTotalTimeoutMultiplier.

This is not currently touched, but will be by the upcoming
sp_blocking_read_next() function.

9 years agoposix: Make sure blocking operations can't time out without trying.
Martin Ling [Thu, 7 May 2015 09:04:11 +0000 (10:04 +0100)]
posix: Make sure blocking operations can't time out without trying.

9 years agoposix: Consistent debug output when blocking operations time out.
Martin Ling [Thu, 7 May 2015 08:41:41 +0000 (09:41 +0100)]
posix: Consistent debug output when blocking operations time out.

9 years agoposix: Move FD_ZERO() and FD_SET() calls outside loops.
Martin Ling [Thu, 7 May 2015 08:41:02 +0000 (09:41 +0100)]
posix: Move FD_ZERO() and FD_SET() calls outside loops.

9 years agowindows: Always check return value of GetOverlappedResult().
Martin Ling [Thu, 7 May 2015 08:19:47 +0000 (09:19 +0100)]
windows: Always check return value of GetOverlappedResult().

9 years agowindows: Restructure if/else blocks with unnecessary indentation.
Martin Ling [Wed, 6 May 2015 23:09:49 +0000 (00:09 +0100)]
windows: Restructure if/else blocks with unnecessary indentation.

9 years agowindows: restart_wait_if_needed(): Inline receive buffer check.
Martin Ling [Wed, 6 May 2015 19:18:37 +0000 (20:18 +0100)]
windows: restart_wait_if_needed(): Inline receive buffer check.

This removes all the debug spam arising from calling sp_input_waiting().

9 years agowindows: restart_wait_if_needed(): Skip buffer check if no bytes read.
Martin Ling [Wed, 6 May 2015 19:15:46 +0000 (20:15 +0100)]
windows: restart_wait_if_needed(): Skip buffer check if no bytes read.

9 years agowindows: Refactor duplicated code into a static function.
Martin Ling [Wed, 6 May 2015 19:11:17 +0000 (20:11 +0100)]
windows: Refactor duplicated code into a static function.

9 years agowindows: Avoid unnecessary calls to SetCommTimeouts().
Martin Ling [Wed, 6 May 2015 15:40:41 +0000 (16:40 +0100)]
windows: Avoid unnecessary calls to SetCommTimeouts().

This fixes bug #586.

9 years agowindows: Strip CR/LF from end of system error messages.
Martin Ling [Wed, 6 May 2015 15:12:27 +0000 (16:12 +0100)]
windows: Strip CR/LF from end of system error messages.

This fixes bug #585.

9 years agodoc: correct structure name in sp_get_port_handle() documentation.
Martin Ling [Thu, 23 Apr 2015 21:23:14 +0000 (22:23 +0100)]
doc: correct structure name in sp_get_port_handle() documentation.

9 years agolibserialport.h.in: Fix/update some API docs.
Uwe Hermann [Sat, 2 May 2015 19:20:30 +0000 (21:20 +0200)]
libserialport.h.in: Fix/update some API docs.

9 years agosp_list_ports(): Actually set list_ptr NULL as documented.
Uwe Hermann [Sat, 2 May 2015 19:18:36 +0000 (21:18 +0200)]
sp_list_ports(): Actually set list_ptr NULL as documented.

9 years agoFix a potential segfault in sp_get_config_*().
Uwe Hermann [Sat, 2 May 2015 19:10:21 +0000 (21:10 +0200)]
Fix a potential segfault in sp_get_config_*().

9 years agoFix a potential segfault in sp_get_port_handle().
Uwe Hermann [Thu, 30 Apr 2015 20:38:58 +0000 (22:38 +0200)]
Fix a potential segfault in sp_get_port_handle().

9 years agowindows.c: Constify a few function parameters.
Uwe Hermann [Sun, 19 Apr 2015 17:33:22 +0000 (19:33 +0200)]
windows.c: Constify a few function parameters.

9 years agosp_get_port_usb_vid_pid(): Document that usb_vid/usb_pid can be NULL.
Uwe Hermann [Sun, 19 Apr 2015 17:18:05 +0000 (19:18 +0200)]
sp_get_port_usb_vid_pid(): Document that usb_vid/usb_pid can be NULL.

9 years agoRename timeout to timeout_ms for clarity in a few places.
Uwe Hermann [Sun, 19 Apr 2015 16:53:26 +0000 (18:53 +0200)]
Rename timeout to timeout_ms for clarity in a few places.

9 years agoautotools: Don't set/override "user variables".
Uwe Hermann [Sun, 19 Apr 2015 16:36:58 +0000 (18:36 +0200)]
autotools: Don't set/override "user variables".

This fixes bug #577.

9 years agoMakefile.am: Simplify LDFLAGS handling a bit.
Uwe Hermann [Sun, 19 Apr 2015 16:33:47 +0000 (18:33 +0200)]
Makefile.am: Simplify LDFLAGS handling a bit.

9 years agoConstify the sp_get_port_description() parameter.
Uwe Hermann [Sun, 19 Apr 2015 17:00:52 +0000 (19:00 +0200)]
Constify the sp_get_port_description() parameter.

9 years agoConstify the sp_get_port_transport() parameter.
Uwe Hermann [Sun, 19 Apr 2015 16:28:10 +0000 (18:28 +0200)]
Constify the sp_get_port_transport() parameter.

9 years agoconfigure.ac: Drop no longer needed SP_PKGLIBS.
Uwe Hermann [Sun, 19 Apr 2015 16:21:19 +0000 (18:21 +0200)]
configure.ac: Drop no longer needed SP_PKGLIBS.

9 years agoVarious Doxygen comment updates and fixes.
Uwe Hermann [Sat, 18 Apr 2015 21:48:29 +0000 (23:48 +0200)]
Various Doxygen comment updates and fixes.

 - Add some missing @param lines.

 - Add [in], [out], or [in,out] markers for @param tags.

 - Add explicit "Must not be NULL" comments for parameters where
   the caller should not pass in a NULL.

9 years agolibserialport.h.in: Drop unneeded <windows.h> #include.
Uwe Hermann [Wed, 15 Apr 2015 23:05:04 +0000 (01:05 +0200)]
libserialport.h.in: Drop unneeded <windows.h> #include.

This is not needed and would pollute the namespace of every
libserialport user on Windows.

9 years agolibserialport.h.in: Add @since tags for new enums.
Uwe Hermann [Wed, 15 Apr 2015 22:53:50 +0000 (00:53 +0200)]
libserialport.h.in: Add @since tags for new enums.

9 years agoSet package version to 0.1.1, use "@since 0.1.1" Doxygen tags.
Uwe Hermann [Wed, 15 Apr 2015 22:47:21 +0000 (00:47 +0200)]
Set package version to 0.1.1, use "@since 0.1.1" Doxygen tags.

The next release will not contain any backwards-incompatible
API or ABI changes, thus changing the package version to 0.1.1.

9 years agowindows: Drop no longer needed -luuid.
Uwe Hermann [Wed, 15 Apr 2015 22:40:49 +0000 (00:40 +0200)]
windows: Drop no longer needed -luuid.

Also, use SP_LIBS in Makefile.am.

This is build-tested using a native MinGW-w64 based toolchain
as well as a MinGW-w64 based cross-compile setup.

9 years agoconfigure.ac: Minor whitespace cosmetics.
Uwe Hermann [Wed, 15 Apr 2015 19:40:32 +0000 (21:40 +0200)]
configure.ac: Minor whitespace cosmetics.

9 years agoDoxyfile: Update to Doxygen 1.8.8 template.
Uwe Hermann [Wed, 15 Apr 2015 19:20:18 +0000 (21:20 +0200)]
Doxyfile: Update to Doxygen 1.8.8 template.

(by running 'doxygen -u')

9 years agoconfigure.ac: Add #include guard to config.h.
Uwe Hermann [Wed, 15 Apr 2015 19:15:04 +0000 (21:15 +0200)]
configure.ac: Add #include guard to config.h.

9 years agoFix a compiler warning when -Wshadow is used.
Uwe Hermann [Sat, 11 Apr 2015 19:03:53 +0000 (21:03 +0200)]
Fix a compiler warning when -Wshadow is used.

    CC       serialport.lo
  In file included from ../serialport.c:25:0:
  ../serialport.c: In function 'get_config':
  ../libserialport_internal.h:227:25: warning: declaration of 'ret' shadows a previous local [-Wshadow]
   #define TRY(x) do { int ret = x; if (ret != SP_OK) RETURN_CODEVAL(ret); } while (0)
                           ^
  ../serialport.c:1566:3: note: in expansion of macro 'TRY'
     TRY(get_baudrate(port->fd, &config->baudrate));
     ^
  ../serialport.c:1543:6: warning: shadowed declaration is here [-Wshadow]
    int ret = get_flow(port->fd, data);
        ^

Also, add -Wshadow to the list of default compiler options.

9 years agoautogen.sh: Drop obsolete MinGW/MSYS items.
Uwe Hermann [Mon, 6 Apr 2015 22:04:43 +0000 (00:04 +0200)]
autogen.sh: Drop obsolete MinGW/MSYS items.

For Windows builds (which require MinGW-w64) we currently support:

 - cross-builds using MXE (mxe.cc) and possibly other cross-compile setups

 - native builds using MSYS2 (sf.net/projects/msys2/)

Neither of those require explicitly specifying ACLOCAL_DIR.

9 years agoREADME: Refer to MSYS2 only.
Uwe Hermann [Mon, 6 Apr 2015 18:25:42 +0000 (20:25 +0200)]
README: Refer to MSYS2 only.

The "old" MSYS related to the "old" and unsupported MinGW (from
mingw.org) may or may not work properly, so only refer to MSYS2 which
we currently recommend and which has been tested.

9 years agoMinor Doxygen improvements and fixes.
Uwe Hermann [Mon, 6 Apr 2015 16:51:17 +0000 (18:51 +0200)]
Minor Doxygen improvements and fixes.

9 years agoconfigure.ac: Use $host_os instead of $target_os.
Uwe Hermann [Sat, 4 Apr 2015 16:10:18 +0000 (18:10 +0200)]
configure.ac: Use $host_os instead of $target_os.

$build and $build_os refer to the machine on which the software is
built, $host and $host_os refer to the machine for which the software
is (cross-)built.

The variables $target and $target_os (despite the confusing names)
are only relevant in the context of building cross-compilers.

9 years agoREADME: Add link to online API docs.
Uwe Hermann [Fri, 3 Apr 2015 20:18:56 +0000 (22:18 +0200)]
README: Add link to online API docs.

9 years agoREADME: Mention FreeBSD port enumeration support.
Uwe Hermann [Fri, 3 Apr 2015 20:17:57 +0000 (22:17 +0200)]
README: Mention FreeBSD port enumeration support.

9 years agoconfigure.ac: Add -Wmissing-prototypes.
Uwe Hermann [Fri, 3 Apr 2015 20:04:20 +0000 (22:04 +0200)]
configure.ac: Add -Wmissing-prototypes.

9 years agoFix two compiler warnings on platforms without enumeration support.
Uwe Hermann [Fri, 3 Apr 2015 20:03:26 +0000 (22:03 +0200)]
Fix two compiler warnings on platforms without enumeration support.

  serialport.c: In function 'sp_list_ports':
  serialport.c:326:6: warning: unused variable 'ret' [-Wunused-variable]
    int ret;
        ^
  serialport.c:325:19: warning: unused variable 'list' [-Wunused-variable]
    struct sp_port **list;
                     ^

9 years agoadd_handle(): Fix a realloc() related issue.
Uwe Hermann [Fri, 3 Apr 2015 20:02:00 +0000 (22:02 +0200)]
add_handle(): Fix a realloc() related issue.

9 years agoFix a compiler warning.
Uwe Hermann [Fri, 3 Apr 2015 15:45:04 +0000 (17:45 +0200)]
Fix a compiler warning.

This fixes the following scan-build warning:

  serialport.c: In function 'sp_list_ports':
  serialport.c:354:1: warning: control reaches end of non-void function [-Wreturn-type]

9 years agoFix indentation of a switch().
Uwe Hermann [Fri, 3 Apr 2015 15:29:52 +0000 (17:29 +0200)]
Fix indentation of a switch().

9 years agoadd_handle(): Fix a memory leak.
Uwe Hermann [Fri, 3 Apr 2015 15:17:49 +0000 (17:17 +0200)]
add_handle(): Fix a memory leak.

This fixes the following scan-build warning:

  serialport.c:1170:3: warning: Potential leak of memory pointed to by 'new_handles'
                  RETURN_ERROR(SP_ERR_MEM, "Mask array realloc() failed");
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

9 years agoUse libtool's -no-undefined option on all platforms.
Uwe Hermann [Fri, 3 Apr 2015 14:58:43 +0000 (16:58 +0200)]
Use libtool's -no-undefined option on all platforms.

9 years agoClarify sp_list_ports() code.
Martin Ling [Tue, 31 Mar 2015 23:24:27 +0000 (00:24 +0100)]
Clarify sp_list_ports() code.

This also fixes the following scan-build warning:

  serialport.c:335:15: warning: Result of 'malloc' is converted to a
  pointer of type 'struct sp_port *', which is incompatible with sizeof
  operand type 'struct sp_port **'
          if (!(list = malloc(sizeof(struct sp_port **))))
                       ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~

9 years agowindows: Set fAbortOnError=FALSE.
Martin Ling [Fri, 27 Mar 2015 22:43:14 +0000 (22:43 +0000)]
windows: Set fAbortOnError=FALSE.

Since we're not handling and clearing receive errors (framing, parity and
overrun), we should turn them off to avoid crashing out with
ERROR_OPERATION_ABORTED in various calls if they occur. Invalid data
will then simply not end up in the buffer. This is consistent with our
current behaviour on posix/termios systems.

It might be nice to be able to inform calling code about receive errors, but I
can't see a good way to do this in a cross-platform way at the moment.

This fixes (parts of) bug #341.

9 years agowindows: Revise management of WaitCommEvent() operations.
Martin Ling [Wed, 25 Mar 2015 18:03:17 +0000 (18:03 +0000)]
windows: Revise management of WaitCommEvent() operations.

This fixes (at least parts of) bug #341.

9 years agoMake std_baudrates[] static (only used in one file).
Uwe Hermann [Wed, 25 Mar 2015 22:38:04 +0000 (23:38 +0100)]
Make std_baudrates[] static (only used in one file).

9 years agoVarious cosmetic and consistency fixes.
Uwe Hermann [Wed, 25 Mar 2015 19:28:48 +0000 (20:28 +0100)]
Various cosmetic and consistency fixes.

9 years agolibserialport_internal.h: Add #include guard.
Uwe Hermann [Wed, 25 Mar 2015 19:29:41 +0000 (20:29 +0100)]
libserialport_internal.h: Add #include guard.

9 years agoFix some typos.
Uwe Hermann [Wed, 25 Mar 2015 19:13:57 +0000 (20:13 +0100)]
Fix some typos.

9 years agolinux_termios.h: Add missing #include of "config.h".
Uwe Hermann [Wed, 25 Mar 2015 13:52:54 +0000 (14:52 +0100)]
linux_termios.h: Add missing #include of "config.h".

9 years agoGenerate a config.h rather than passing defines on command line.
Martin Ling [Tue, 24 Mar 2015 23:15:32 +0000 (23:15 +0000)]
Generate a config.h rather than passing defines on command line.

Fixes bug #553.

9 years agoFix misleading snprintf() arguments.
Uwe Hermann [Fri, 20 Feb 2015 17:57:08 +0000 (18:57 +0100)]
Fix misleading snprintf() arguments.

9 years agoIf present, add usb_serial to description for better identification
Uffe Jakobsen [Mon, 16 Feb 2015 22:07:00 +0000 (23:07 +0100)]
If present, add usb_serial to description for better identification

9 years agoHandle enumeration of native UART ports on FreeBSD
Uffe Jakobsen [Mon, 16 Feb 2015 13:13:01 +0000 (14:13 +0100)]
Handle enumeration of native UART ports on FreeBSD

9 years agoImplement FreeBSD OS-specific serial port detection and query
Uffe Jakobsen [Tue, 13 Jan 2015 22:14:54 +0000 (23:14 +0100)]
Implement FreeBSD OS-specific serial port detection and query

9 years agowindows: Fix restart of RX/error wait operation after reads.
Martin Ling [Wed, 24 Sep 2014 14:30:39 +0000 (15:30 +0100)]
windows: Fix restart of RX/error wait operation after reads.

This fixes bug #421.

9 years agoFix free() of uninitialized pointer.
Boris Gjenero [Fri, 5 Dec 2014 17:38:43 +0000 (18:38 +0100)]
Fix free() of uninitialized pointer.

Explicitly set port->usb_path to NULL, otherwise a free(port->usb_path)
can happen where port->usb_path is uninitialized.

This closes bug #512.

10 years agowindows: Properly handle return value of SetupDiOpenDevRegKey().
Aurelien Jacobs [Thu, 27 Nov 2014 16:41:23 +0000 (17:41 +0100)]
windows: Properly handle return value of SetupDiOpenDevRegKey().

This fixes bug #499.

10 years agolinux: Check for BOTHER macro at configure time.
Martin Ling [Wed, 24 Sep 2014 19:04:39 +0000 (20:04 +0100)]
linux: Check for BOTHER macro at configure time.

This fixes bug #363.

10 years agoFlush only the requested buffers
Janne Huttunen [Sat, 11 Oct 2014 09:13:41 +0000 (12:13 +0300)]
Flush only the requested buffers

Fix the sp_flush() so that it flushes only the requested buffers
also in unix.

10 years agoFix typos.
Bert Vermeulen [Sun, 5 Oct 2014 00:38:35 +0000 (02:38 +0200)]
Fix typos.

10 years agowindows: Fix compile issues with multiply or not defined GUIDs.
Martin Ling [Wed, 24 Sep 2014 19:53:03 +0000 (20:53 +0100)]
windows: Fix compile issues with multiply or not defined GUIDs.

This fixes bug #416.

10 years agowindows: Indentation (cosmetics only).
Aurelien Jacobs [Wed, 24 Sep 2014 10:47:58 +0000 (12:47 +0200)]
windows: Indentation (cosmetics only).

10 years agowindows: Fix various memory leaks.
Aurelien Jacobs [Wed, 24 Sep 2014 10:44:40 +0000 (12:44 +0200)]
windows: Fix various memory leaks.

This fixes bug #419.

10 years agoAdd SP_MODE_READ_WRITE enum value.
Aurelien Jacobs [Sat, 20 Sep 2014 19:24:31 +0000 (21:24 +0200)]
Add SP_MODE_READ_WRITE enum value.

10 years agoREADME: Add URL to the libserialport website.
Uwe Hermann [Sun, 7 Sep 2014 17:31:23 +0000 (19:31 +0200)]
README: Add URL to the libserialport website.

10 years agoREADME: Mention that only MinGW-w64 works (but not MinGW).
Uwe Hermann [Sun, 7 Sep 2014 17:27:02 +0000 (19:27 +0200)]
README: Mention that only MinGW-w64 works (but not MinGW).

10 years agowindows: -no-undefined is required to make a DLL.
Michael B. Trausch [Sun, 7 Sep 2014 01:39:40 +0000 (21:39 -0400)]
windows: -no-undefined is required to make a DLL.

10 years agowindows: Add -lsetupapi when building for WIN32.
Michael B. Trausch [Sun, 7 Sep 2014 01:34:03 +0000 (21:34 -0400)]
windows: Add -lsetupapi when building for WIN32.

10 years agowindows: Include proper GUID defining header to fix build.
Michael B. Trausch [Sun, 7 Sep 2014 00:23:16 +0000 (20:23 -0400)]
windows: Include proper GUID defining header to fix build.

The initguid.h header must appear early or it does not have
an effect, at least on cross-build from Linux.

10 years agolinux: remove readlinkat() dependency
Aurelien Jacobs [Thu, 4 Sep 2014 18:13:55 +0000 (20:13 +0200)]
linux: remove readlinkat() dependency

10 years agolinux_termios: fix return types to actually match returned values
Aurelien Jacobs [Thu, 4 Sep 2014 18:13:55 +0000 (20:13 +0200)]
linux_termios: fix return types to actually match returned values

This fixes the following warning :

linux_termios.c: In function 'get_termios_get_ioctl':
linux_termios.c:42:2: warning: overflow in implicit constant conversion [-Woverflow]
  return TCGETS2;
  ^

This fixes bug #396.

10 years agoFix Mac OS X build (untested).
Uwe Hermann [Wed, 27 Aug 2014 12:56:19 +0000 (14:56 +0200)]
Fix Mac OS X build (untested).

10 years agoFix Windows build.
Uwe Hermann [Wed, 27 Aug 2014 12:53:19 +0000 (14:53 +0200)]
Fix Windows build.

10 years agolinux: Fix warning by marking vid, pid variables unsigned.
Martin Ling [Sun, 24 Aug 2014 13:08:00 +0000 (14:08 +0100)]
linux: Fix warning by marking vid, pid variables unsigned.

10 years agoCompile with -pedantic.
Martin Ling [Sun, 24 Aug 2014 13:00:43 +0000 (14:00 +0100)]
Compile with -pedantic.

10 years agolinux: Define feature macros to get required functions.
Martin Ling [Sun, 24 Aug 2014 12:34:33 +0000 (13:34 +0100)]
linux: Define feature macros to get required functions.

This is needed to build with -std=c99.

10 years agoRevise debug macros to work in strict C99.
Martin Ling [Sun, 24 Aug 2014 12:59:32 +0000 (13:59 +0100)]
Revise debug macros to work in strict C99.

10 years agoSpecialise RETURN_VALUE macro into RETURN_{INT,STRING,POINTER}.
Martin Ling [Sun, 24 Aug 2014 12:30:34 +0000 (13:30 +0100)]
Specialise RETURN_VALUE macro into RETURN_{INT,STRING,POINTER}.

This avoids the need to pass the required format string on every
call and also eliminates the need for the non-standard typeof() call.

10 years agolibserialport.h.in: remove trailing commas in enum definitions
Antti Nykanen [Sun, 24 Aug 2014 09:03:15 +0000 (12:03 +0300)]
libserialport.h.in: remove trailing commas in enum definitions

This makes it easier to use libserialport on projects that build with
the GCC -pedantic flag enabled.