yan9a / serial

A simple to use C++ header file for Serial port (Com port)
MIT License
62 stars 23 forks source link

Open() methods used for win / lnx have opposite signed return values #4

Closed rejuce closed 1 year ago

rejuce commented 1 year ago

when compiled for windows open() returns positive numbers on error

when compiled on linux open() return negative numbers on error

that gives one a big gatcha when unsing in win/linux cross plattform code.

suggest: invert windows return code and unify to posix

yan9a commented 1 year ago

Updated accordingly. Thank you!