Commit graph

19 commits

Author SHA1 Message Date
V.Krishn
1ba878cdd5 Fix build with musl libc
Fix building libwebsockets with the musl C libary.

<sys/cdefs.h> is an internal glibc header and should be avoided in user code.

__P() was used for compatibility with some old K&R C compilers, when there were
no prototypes (which were introduced to C with C89). As supporting legacy
non-ANSI compilers is nowadays not necessary anymore get rid of the unnecessary
function prototype using __P().
2016-03-30 06:24:24 +08:00
Andy Green
1cc03887f4 clean reduce windows build warnings
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-06 08:00:03 +08:00
Andy Green
6230476455 api rationalization use new names internally
Change all internal uses of rationalized public apis to reflect the
new names.

Theer are a few things that got changed as side effect of search/replace
matches, but these are almost all internal.  I added a compatibility define
for the public enum that got renamed.

Theoretically existing code should not notice the difference from these
two patches.  And new code will find the new names.

https://github.com/warmcat/libwebsockets/issues/357

Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-04 08:43:54 +08:00
=?UTF-8?q?Joakim=20S=C3=B6derberg?=
cefab311d6 Use LWS_HAVE_ instead of just HAVE_
Since we include lws_config.h in the public headers, at least our HAVE_ macros should be kind of unique, so that we don't get redefinitions when used with other libraries using config files as well.
2015-10-12 09:53:17 +08:00
Andy Green
104316eb8f internal SHA1 users all use libwebsockets_SHA1
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-09-26 05:56:23 +08:00
Andy Green
158e804cb7 refactor out WIN32 tests from code
This gets rid of all the platform-dependent #ifdef stuff and
migrates it into the new lws-plat-xxx.c files.

These are then included in a one-time test in libwebsockets.c
according basically to Windows or not.

The idea is from now on, all Windows-specific code should go in
lws-plat-win.c, where any kind of Windows perversion like DWORD
is fine.

Any new functions going in there should be named lws_plat_...
and be defined in all the lws-plat-xxx.c file (currently just
win32 and unix platforms are supported).

Signed-off-by: Andy Green <andy.green@linaro.org>
2014-04-02 14:25:10 +08:00
Patrick Gansterer
4a83727bf6 Remove duplicated implementations for bzero()
Define bzero() in a central place if HAVE_BZERO is not set
2014-02-28 20:28:06 +08:00
Patrick Gansterer
e5720a347e Cleanup include statements
Remove useless includes and add some preprocessor conditions for platform specific headers.
2014-02-28 08:51:35 +08:00
Patrick Gansterer
b37bd6ce5c Fix endian detection on non-linux systems
f975f73640 introduced inclusion of endian.h,
which is not a standard header. Only include it on Linux machines and
add similar includes for Apple and FreeBSD.
2014-02-27 20:52:01 +08:00
Daniel Ludwig
f975f73640 missing endian preprocessor defines on Linux environments 2014-02-15 15:07:03 +08:00
Andreas Pakulat
68bd4bd7bf Support _WIN32 in addition to WIN32 define
MSVC8 and MSVC9 set only _WIN32, so support that define as well to be able
to compile libwebsockets with those compilers.
2013-11-04 10:04:31 +08:00
Joachim Bauch
d8b8542d59 Declare "sha1_init" statically to avoid naming conflicts if linked statically with other libraries providing a method with the same name (e.g. OpenSSL). 2013-06-23 14:45:15 +08:00
David Galeano
d3ce131a78 Static variable is now const. 2013-01-09 15:14:31 +08:00
Peter Hillier
05c66f7e4e android toolchain SHA1 endian fix
Android toolchain needs an extra include if it's not to confuse
SHA-1 code probably with incorrect endian-ness from missing /bits/

Signed-off-by: Peter Hillier <peterhillier@yahoo.com>
Signed-off-by: Andy Green <andy@warmcat.com>
2012-05-02 06:09:45 +08:00
Andy Green
6ee372fcd8 style cleaning
Signed-off-by: Andy Green <andy.green@linaro.org>
2012-04-09 15:24:22 +08:00
David Galeano
08d60f1876 Added BYTE_ORDER definition for win32 builds. 2011-10-03 19:30:27 +08:00
Peter Hinz
56885f3084 introduce win32 build capability
This adds win32 build compatability to libwebsockets.

The patch is from Peter Hinz, Andy Green has cleaned it up a bit and
possibly broken win32 compatability since I can't test it, so there
may be followup patches.  It compiles fine under Linux after this
patch anyway.

Much of the patch is changing a reserved keyword for Visual C compiler
"this" to "context", but there is no real C99 support in the MSFT
compiler even though it is 2011 so C99 style array declarations
have been mangled back into "ancient C" style.

Some windows-isms are also added like closesocket() but these are
quite localized.  Win32 random is just using C library random() call
at the moment vs Linux /dev/urandom.  canonical hostname detection is
broken in win32 at the moment.

Signed-off-by: Peter Hinz <cerebusrc@gmail.com>
Signed-off-by: Andy Green <andy@warmcat.com>
2011-03-02 22:03:47 +00:00
Andy Green
90c7cbcc00 introduce-ssl-client-connections--flow-control.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-27 06:26:52 +00:00
Andy Green
7619c47e9c introduce-private-md5-sha1.patch
Signed-off-by: Andy Green <andy@warmcat.com>
2011-01-23 17:47:08 +00:00