0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 16:45:51 +08:00

53 Commits

Author SHA1 Message Date
sabotagebeats
06aba27b04 fix: building libzmq fails with error src/clock.cpp:131:16: error: unused variable 'nsecs_per_usec' 2021-07-22 21:53:19 -07:00
Rosen Penev
a02cbd0646
fix unused variables under windows
Fixes compilation as -Werror is passed.
2021-05-02 16:49:27 -07:00
Luca Boccassi
110551d5df Problem: formatting errors
Solution: apply clang-format-diff
2020-08-15 12:26:14 +01:00
Davit Kalantaryan
0a424486a0
Modifications to compile code for WINDOWS ARM and ARM64 (#4003)
* Modifications to compile code for WINDOWS ARM and ARM64

[why]
In order to compile ZMQ related software on WINDOWS ARM

[how]
Replaced code in the file clock.cpp around the line 240.
Added intrinsics for ARM to replace '__rdtsc'

[todo]
Find proper tick counter query for ARM64 (see file:clock.cpp,line:~250)

* RELICENSEing

[why]
To make usage of changed code properly usable by libzmq project team

[how]
Added file /RELICENSE/kalantar.md with necessary information
2020-08-06 17:41:15 +01:00
grmt
718ad8ab96
add wss transport and fix tipc tests when building using cmake on linux (#3857)
* Allow CMAKE to generate ws and wss transports
I guess there is little use of just ws transport, so by default
GnuTLS (and libsodium) are enabled

* cmake libzmq including wss transport (ubuntu 19.10 and ubuntu 19.10 + wsl 1.0)
test_security_fails (libsodium assert !?)

* updated relicense

* make external libs gnutls nss sodium optional

* #ifdef WSS classes and functions, build test*ws* only if correct libs are included, warning if libs not present

* make libsodium optional

* cmake fix tests TIPC transport

* clang-format pointed out a wrongly placed #ifdef

* GnuTLS before 3.6.7 is not safe

* msvc doesn't agree with strlen in array declaration, test_socks now at least compiles on windows

* windows: libsodium build fails, missing include dirs set by env var

* ws transport test only works when GnuTLS is found

* Fixed condition to use NSS / built in SHA1, so that test_ws_transport should now pass, also when GnuTLS is not found
2020-04-13 23:03:19 +01:00
Simon Giesecke
41e3f14d6a Problem: ptr/ref parameters and local variables are non-const but never modified
Solution: add const
2020-01-27 10:38:00 +01:00
Simon Giesecke
e3c73d9881 Problem: inconsistent naming style for private data members, conflicts with naming of local variables and member functions
Solution: apply and check _lower_case naming style for private data members
2018-05-27 13:24:07 +02:00
Simon Giesecke
06cfd0d8ad Problem: unclear why QueryPerformanceFrequency is called for every call of QueryPerformanceCounter
Solution: add a comment
2018-05-27 13:24:07 +02:00
Simon Giesecke
97ba02bc2f Problem: redundant empty dtor
Solution: removed
2018-05-27 13:24:06 +02:00
Simon Giesecke
6ef67f13e3 Problem: use of C-style casts and magic literals
Solution: replace by static_cast, and introduce appropriate constants
2018-05-27 13:24:06 +02:00
Simon Giesecke
1432011277 Problem: inconsistent local variable naming
Solution: configured clang-tidy check and applied fixes
2018-05-26 09:34:44 +02:00
Simon Giesecke
d6952ded71 Problem: unused include directives and redundant forward declarations
Solution: removed
2018-05-22 18:46:40 +02:00
Simon Giesecke
4e616f30dd Problem: C-style casts used
Solution: replace by C++-style casts
2018-05-18 17:04:01 +02:00
Manuel Segura
4726f7262d Pull request to merge porting to WindRiver VxWorks 6.x (#2966)
* Problem: Still need to port over more files to VxWorks 6.x

Solution: Port more files to VxWorks 6.x

* Problem: Need to port over remaining files to VxWorks 6.x. Also remove POSIX thread dependency for VxWorks (because of priority inversion problem in POSIX mutexes with VxWorks 6.x processes)

Solution: Port over remaining files to VxWorks 6.x. Also removed POSIX thread dependency for VxWorks

* Problem: Needed to modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x.

Solution:  Modify TCP, UDP, TIPC classes with #ifdefs to be compatible with VxWorks 6.x
2018-03-10 11:03:02 +00:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Asmod4n
ce602d08db change macOS < 10.12 clock to SYSTEM_CLOCK, fixes #2537 (#2538)
* change macOS < 10.12 clock to SYSTEM_CLOCK, fixes #2537

* remove clock_id option from alt_clock_gettime since we always want a monotonic clock.

* update header definition for alt_clock_gettime

* pass clock definition down to host_get_clock_service for macOS < 10.12

* change to monotonic clocks
2017-04-19 23:13:06 +01:00
bbdb68
1d58a00992 Problem: no windows UWP support
* add define for windows/UWP

* prevent issue with COM references

* gettickcount not available on uwp

* add compiler definitions

* add convenitnece cmake file

* brute force uwp compilation

* fix compiler version

* cosmetics
2017-04-04 09:50:33 +01:00
Ahmad M. Zawawi
bf6d8a5d17 Fix clock_t crash on iOS 9.3.2 and 9.3.5 (#2325)
* Fix possible clock_t crash on iOS 9.3.2 and 9.3.5 + macOS < 10.12

* No need to read return value
2017-01-26 13:21:41 +00:00
Robert Castle
0dfb32a259 Problem: clock_gettime is now defined in macOS 10.12 SDK
Solution: Rename the custom implementation of clock_gettime for macOS to
alt_clock_gettime and wrap all usage in preprocessor macros to only enable the
alternative version when using macOS <= 10.11.

This issue occurs when targeting macOS 10.11 or earlier but using the 10.12
or newer SDK.
2016-10-28 11:04:21 +01:00
Laughing
c5b528fdcd performance enhancement
use clock_gettime if there is no instruction to get cpu tick. It will take about 10% performance enhancement in AIX 7.1.
2016-10-14 20:33:27 +08:00
Reza Ebrahimi
e5599de6c3 Convert manual (locking and unlocking) mutexes to scoped mutexes for the case of unlocking mutex even if the protected operation throws an exception (#2071) 2016-07-31 13:27:11 +01:00
evoskuil
2b798e486a Problem: name conflicts from windows.h, draft API declared in pch. 2016-05-13 20:41:26 -07:00
Osiris
b3d5fa63a0 Problem: Several problems found by Coverity Static Analyzer
Solution: The Coverity Static Code Analyzer was used on libzmq code and found
many issues with uninitialized member variables, some redefinition of variables
hidding previous instances of same variable name and a couple of functions
where return values were not checked, even though all other occurrences were
checked (e.g. init_size() return).
2016-02-21 15:49:47 -06:00
Osiris
4a5af9d58b Problem: Precompiled headers not being used
Solution: Phase I - make precompiled.hpp be first file included in every source file
2016-02-18 10:56:52 -06:00
Constantin Rack
a539b0c6e8 Problem: copyright year is still 2015
Solution: update to 2016
2016-01-28 15:07:31 +01:00
Joe Eli McIlvain
61217a2686 Problem: Source files contain mixed tabs and spaces.
Solution: Convert to spaces and remove trailing whitespace in these files.
2015-08-20 07:46:34 -07:00
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00
evoskuil
bc53d710ff Fix error return for clock_gettime. 2015-02-13 23:10:39 -08:00
evoskuil
a8f11b3c3d Add clock_gettime implementation for OSX. 2015-02-13 22:50:28 -08:00
Pieter Hintjens
94d9a4ffdf Problem: copyright statements are out of date
Solution: update for 2015

Fixes #1320
2015-01-22 10:32:37 +01:00
Alessandro Ghedini
245c75aad6 Fix timestamp counter on s390/s390x
Fixes #811
2014-01-12 12:31:40 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
psl-felipefarinon
31cf53f025 issue #583 removing C++11 code. 2013-11-11 10:20:28 -02:00
psl-felipefarinon
485db41a43 Fixing broken build issue #583 2013-11-07 15:21:42 -02:00
psl-felipefarinon
b8a9f299fb Fixing issue #583. Using low resolution timer for clock::now_ms 2013-11-07 14:06:54 -02:00
Pieter Hintjens
f0f16505e5 Removed corporate advertisements from source file headers
Copyrights had become ads for Sustrik's corporate sponsors, going against the original
agreement to share copyrights with the community (that agreement was: one line stating
iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
is also unfair to the many individual authors. I've removed ALL corporate title from
the source files so the copyright statements can now be centralized in AUTHORS and
source files can be properly updated on an annual basis.
2013-03-12 13:24:57 +01:00
Duane Littleton
1e52a451d6 Windows: Fix rounding error when calculating now_us
Improve accuracy of time calculations and avoid division by zero when
ticksPerSecond.QuadPart < 1000000.
2013-02-27 13:53:07 -05:00
Sébastien Rombauts
41d79bc19e Windows CE support : using standard _WIN32_WCE flag instead of WINCE
- when compiling for Windows CE, a C++ project must define the preprocessor definitions: UNDER_CE=$(CEVersion),_WIN32_WCE=$(CEVersion)
- choosing the "_WIN32_CE" form for uniformization with "_WIN32" and "_WIN32_WINNT" already used in libzmq (boost is using both forms)
- see http://msdn.microsoft.com/en-us/library/ee479161(v=winembedded.60).aspx
2013-02-19 16:49:23 +01:00
boris@boressoft.ru
318ba8836f Add WinCE support.
* Added two new files: errno.hpp and errno.cpp. They are required to use errno functionality on WM.
* zmq.cpp, msg.h: removed inclusion of errno.h because it is included in zmq.h that is also included by .cpp.
* windows.hpp: process.h is included only for desktop builds.
* thread.cpp: on CE CreateThread is used instead of __beginthreadex
* socket_base.cpp, clock.cpp: on CE include cmnintrin.h instead on intrin.h
* signaler.cpp: on Windows should use special macro around event name (for unicode builds)
* err.hpp: make it include errno.hpp (my file) instead on errno.h when building for CE
* err.cpp: use FormatMessage when building for CE (because CE does not have ANSI API functions)
* zmq.h: do not include errno.h whe building for CE
* libzmq.vcproj: add tro new files
2012-03-14 19:12:28 +04:00
Pieter Hintjens
95f6a07403 Merge pull request #224 from vortechs2000/master
Patch from Mikko Koppanen for #LIBZMQ-301
2012-01-27 14:47:14 -08:00
m
c4f2240851 Fix: runtime patch for when system has clock_gettime but does not support CLOCK_MONOTONIC. 2012-01-27 12:40:56 -08:00
AJ Lewis
2e0c4330fa Patch from Mikko Koppanen for #LIBZMQ-301
Add the '-Ae' flag and check for gethrtime() on HPUX

Check if CLOCK_MONOTONIC defined before using it - if not, use
gethrtime() if it's available, otherwise fall back to the old
behavior.

Signed-off-by: AJ Lewis <aj.lewis@quantum.com>
2012-01-19 13:09:23 -06:00
Mika Fischer
aaac96d94a This makes clock_t insensitive to the system clock being reset by NTP or
the sysadmin, which could previously cause long hangs for instance in
zmq_poll.

Signed-off-by: Mika Fischer <mika.fischer@zoopnet.de>
2011-12-03 13:07:30 +01:00
Martin Sustrik
8e21d64c97 Copyright dates adjusted to reflect reality
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-01 18:06:11 +01:00
Martin Sustrik
ac7717b7b3 250bpm copyrights added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31 16:20:30 +01:00
Martin Sustrik
18b9ebea32 The copyrights in file headers updated.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-03-02 16:30:40 +01:00
Neale Ferguson
7051387108 Support dynamic generation of C preprocessor definitions for PGM rather than hardcoding them.
Signed-off-by: Neale Ferguson <neale@sinenomine.net>
2011-01-12 09:22:25 +01:00
Martin Sustrik
b358df9fff Name of "GNU Lesser Public License" corrected.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-30 15:08:28 +02:00
Martin Sustrik
401986e6bb Build with MSVC2005 fixed
To use __rdtsc() function MSVC2005 requires including intrin.h

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-26 15:35:56 +02:00
Martin Sustrik
61d38fbeed Bug in low precision clock fixed.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2010-10-16 14:48:06 +02:00