aboutsummaryrefslogtreecommitdiffstats
path: root/common/os
Commit message (Collapse)AuthorAgeFilesLines
* Split SystemException to handle WindowsPierre Ossman2024-10-092-13/+13
| | | | | | | | | | | | | Windows has (at least) two error namespaces, both errno and GetLastResult(). These overlap, so it is important we keep track of which one we are dealing with. To make things extra problematic, the BSD socket API normally uses errno, but on Windows it has been mapped in to the GetLastResult() namespace. Try to keep better control of this by using separate classes for the namespaces.
* Avoid shadowing variablesPierre Ossman2024-06-241-2/+2
| | | | | It's a source of confusion and possibly bugs to reuse the same variable name for multiple things.
* Use nullptr in all C++ codePierre Ossman2024-06-243-20/+24
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Create common recursive mkdir()Pierre Ossman2024-05-302-0/+41
| | | | | | | Avoid duplicating this complexity in too many places. At the same time make the interface more identical to regular mkdir(), for familiarity.
* Implement XDG Base Directory paths, deprecate ~/.vnc902024-04-262-38/+40
|
* Begin work on XDGBDS compliance and overrideable configs902024-03-152-10/+56
|
* Prefer target_include_directories()Pierre Ossman2023-03-311-2/+1
| | | | | It is more specific, and it properly sets up propagation when include directories also need to be used further down a dependency chain.
* Add all common inter-dependenciesPierre Ossman2023-03-311-0/+2
| | | | | This is important in case there are build flags that need to propagate between libraries for things to build correctly.
* Remove trailing slash from getvnchomedir()Pierre Ossman2023-02-041-3/+3
| | | | | It should return a path to the directory itself, just like its sister function getuserhomedir().
* Namespace directory functionsPierre Ossman2023-02-042-18/+22
| | | | All library functions should be in a proper namespace.
* Return static char buffer from some methodsPierre Ossman2023-02-042-41/+33
| | | | | | | | | This mimics how some system functions (like inet_ntop()) work, and avoids complexity around ownership of the returned string buffer. The downside is that the string must be consumed directly as it will be overwritten on the next call, but that is not an issue with the current usage.
* Replace tabs with spacesPierre Ossman2023-02-041-45/+45
| | | | Use the same indentation we use in all other files.
* Get rid of TCHAR magicPierre Ossman2023-02-042-9/+3
| | | | | We never use Windows' "UNICODE" mode anyway, so let's get rid of this complexity.
* Remove old mingw compatibility codePierre Ossman2023-01-054-223/+0
| | | | | This isn't needed with modern build environments, and can even conflict with them.
* Be consistent in including config.hPierre Ossman2021-12-303-4/+8
| | | | | | The generally recommended way is to include it from source files, not headers. We had a mix of both. Let's try to be consistent and follow the recommended way.
* Adjust default directory for configuration file save and loadJohannes2021-09-212-4/+39
|
* Clean up default value for X509 parametersPierre Ossman2021-06-132-20/+0
| | | | | Let's avoid making this too complex and force every user to know about magical functions.
* Don't throw exceptions in destructorsPierre Ossman2017-09-151-10/+2
|
* Include stddef.h to get access to size_tPierre Ossman2016-07-071-0/+2
|
* Fix typo in include protectorPierre Ossman2016-07-071-1/+1
|
* Block signals from being handled on worker threadsPierre Ossman2016-01-041-0/+12
|
* Include class keyword for friend declarationPierre Ossman2015-12-081-1/+1
| | | | | Only C++11 allows omitting the class keyword, so include it so the code compiles with older compilers.
* Create one decode thread for each CPUPierre Ossman2015-11-272-0/+34
| | | | | | We can start creating more decoding threads now that we handle rect ordering properly. No point in creating more threads than there are CPUs though.
* Make the decoder multi-threadedPierre Ossman2015-11-271-0/+4
| | | | | | | This implements the basic infrastructure for multi-threaded decoding of rects. However there is just one thread reading data and one thread decoding it. More logic is needed to safely decode multiple rects at the same time.
* Add abstraction classes for system thread primitivesPierre Ossman2015-11-275-0/+403
|
* Fix Winsock errno code overlapPierre Ossman2015-05-291-13/+1
| | | | | Some Winsock errno:s conflict with the standard ones. Try to restrict the redefines to things relevant for sockets.
* Merge branch 'upreqs' of https://github.com/CendioOssman/tigervncPierre Ossman2015-03-123-259/+1
|\ | | | | | | | | | | Conflicts: contrib/packages/rpm/el5/SPECS/tigervnc.spec vncviewer/Viewport.cxx
| * Raise GnuTLS requirements to 3.xPierre Ossman2015-01-293-259/+1
| | | | | | | | | | | | This allows us to simplify things by getting rid of some old compatibility code. People should really be using current versions of GnuTLS anyway to stay secure.
* | Use a common header file for Windows errno names.Peter Åstrand (astrand)2015-02-051-0/+101
|/ | | | | | | | In earlier Visual Studio and MinGW editions, BSD socket errno:s were left undefined. This is no longer the case. This may cause build or runtime errors. To avoid this, we are using a common header file which corrects all definitions. This header will also be used with other projects such as sercd, unfs3, PulseAudio etc.
* Remove a lot of platform compatibilty stuffPierre Ossman2014-07-076-266/+5
| | | | It's either not used, or no longer relevant.
* Create common/os/libos.la fileAdam Tkac2012-09-051-0/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4996 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Enable WinVNC build with MinGW and MinGW64DRC2011-10-124-0/+218
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4723 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Move setting of PIC code to a central locationDRC2011-08-231-8/+0
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4648 3789f03b-4d11-0410-bbf8-ca57d06f2519
* CMake doesn't handle convenience libraries as nicely as autotools does. WePierre Ossman2011-08-221-0/+8
| | | | | | | need to be explicit with -fPIC here as we use these in libvnc.so. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4645 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Remove unused autotools build systemDRC2011-06-241-9/+0
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4540 3789f03b-4d11-0410-bbf8-ca57d06f2519
* We don't need to special case Windows anymore now since we have properPierre Ossman2011-03-081-5/+1
| | | | | | | checks for old GnuTLS in CMake. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4333 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Fix up typo that's been copied around in several places.Pierre Ossman2011-03-081-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4332 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Windows actually has socklen_t, it's just that it is in a special header.Pierre Ossman2011-03-081-0/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4327 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Bugfix] Fix Windows build, recently added GNUTLS compat code broke it.Adam Tkac2011-02-092-5/+6
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4279 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Bugfix] Improve compatibility with ancient GNUTLS implementations even more.Adam Tkac2011-02-092-0/+18
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4278 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Development] os: add gnutls_x509_crt_print() implementation, older systemsAdam Tkac2011-02-094-3/+246
| | | | | | | don't have it and improve backward compatibility of TLS code. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4277 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Development] os: introduce new function called "fileexists"Adam Tkac2011-02-072-0/+19
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4255 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Development] Rename function "gethomedir" to "getvnchomedir" and rewrite it inAdam Tkac2011-02-072-8/+8
| | | | | | | | | platform-intependent manner. Thanks to Guillaume Destuynder. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4252 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Development] Implement gethomedir() function on Windows.Adam Tkac2010-11-252-8/+32
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4208 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Bugfix] Don't compile gethomedir function on WIN32Adam Tkac2010-10-291-0/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4178 3789f03b-4d11-0410-bbf8-ca57d06f2519
* [Development] Introduce gethomedir() function to retrieve home directory path.Adam Tkac2010-10-294-3/+104
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4176 3789f03b-4d11-0410-bbf8-ca57d06f2519
* CMake build system for WindowsDRC2010-10-272-0/+6
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4171 3789f03b-4d11-0410-bbf8-ca57d06f2519
* - use unix/configure.ac as top-level configure.ac baseAdam Tkac2009-09-045-16/+11
| | | | | | | | - create stub top-level Makefile.am - make common/ subtree compilable git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/unified_buildsys@3892 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Revert r3657 (import of autogenerated) files.Adam Tkac2009-03-131-443/+0
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3675 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Import autogenerated files for unix/ and common/ subdirs to make sourceAdam Tkac2009-03-111-0/+443
| | | | | | | | compilable without GNU autotools. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3657 3789f03b-4d11-0410-bbf8-ca57d06f2519