8 Commits

Author SHA1 Message Date
Emil Engler
e77f187274 sample: use unsigned short instead of int for port
The C standard gurantees that an unsigned short is at least up to 65535
huge. Enough to store every TCP port. Also the parameter PORT is
overgiven to the `htons()` function which assumes that the parameter is
of type `uint16_t` which unsigned short is on most platforms.
2021-04-03 12:50:00 +03:00
yangyongsheng
1edb6f6188 Initialize variable to 0 replace use memset function in sample/hello-world.c 2019-12-30 10:09:15 +08:00
kirillDanshin
2d3cd35362 sample/hello-world: exAmple, not eXMple
Fixes: #334
2016-03-09 01:10:51 +03:00
Nick Mathewson
9f560bfa11 Use "_WIN32", not WIN32: it's standard and we don't need to fake it
This patch was automatically generated with perl.

Based on a patch by Peter Rosin.
2011-05-25 20:03:15 -04:00
Harlan Stenn
10c834c4df Include arpa/inet.h as needed on HPUX 2011-02-22 00:24:36 -05:00
Nick Mathewson
d89fdba424 Make sample/hello_world work on windows
We forgot to include the WSAStartup call in main().

Patch from an anonymous user on Sourceforge.

Fixes bug 3025354.
2010-07-05 12:28:22 -04:00
Nick Mathewson
b72be50d7a Add some headers to fix freebsd compilation 2010-02-18 13:52:04 -05:00
Nick Mathewson
becb9f9cd3 Add a new "hello world" sample program 2010-01-27 01:46:23 -05:00