1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-09-01 14:21:56 +03:00
Commit Graph

86 Commits

Author SHA1 Message Date
Eric Tsau
706770ad62 Fixed compilation issues with tdm-gcc 2015-05-23 09:53:36 +12:00
bel
1df408d8e4 Autoformat after merge 2015-05-22 17:44:03 +02:00
Matt Clarkson
81b43e9450 Correct the dialog callbacks
The dialog callback type actually returns INT_PTR even though it returns
a boolean value.

MSDN has the following to say:

> Type: INT_PTR
>
> Typically, the dialog box procedure should return TRUE if it
> processed the message, and FALSE if it did not. If the dialog box
> procedure returns FALSE, the dialog manager performs the default
> dialog operation in repsonse to the message.

Top work Microsoft!
2015-05-22 16:19:40 +01:00
Matt Clarkson
a35cd511fa Correct argument for GetDlgItem
GetDlgItem takes an integer as the identifier of the contol to be
retrieved. buflen is an unsigned integer. Assuming this code works
this just makes the truncation cast explicit. No functionality changes
but buflen *could* be over the limit of an integer. Very unlikey that
there will be a string that is 2^31 long though.
2015-05-22 16:19:40 +01:00
Matt Clarkson
798e808e2b Cast the process id
GetProcessId returns a DWORD (which is unsigned) and the HighPart or a
LARGE_INTEGER is a LONG (which is signed). As we are just doing some
hashing it is fine to cast this.
2015-05-22 16:19:40 +01:00
Matt Clarkson
d81258ce88 Use correct type for pointer alignment
On 64bit systems casting to long may result in a truncation of data
resulting in an incorrect alignment
2015-05-22 16:19:40 +01:00
Matt Clarkson
d8f7976560 add_control uses same types as DLGITEMTEMPLATE
This resolves a lot of sign conversion warnings and avoids hidden
truncation casting inside the function.
2015-05-22 16:19:40 +01:00
Matt Clarkson
05b78cf925 Correct casting of pointers
Casting pointers to intgers for arithmetic should be done with intptr_t
as that is corrected for pointer widths on 32bit and 64bit systems
2015-05-22 16:19:40 +01:00
Matt Clarkson
a13cd6e0dd Hide unused function
The create_config_file is not currently used on Windows.
2015-05-22 16:19:40 +01:00
Matt Clarkson
da57b9e811 Remove redundant break
The die function is noreturn so will exit the program
2015-05-22 16:06:06 +01:00
Matt Clarkson
faee7ad229 Correct tag non-returning functions
The noreturn attribute can be used to allow the compiler to perform
better optimisations and/or warnings.
2015-05-22 16:06:06 +01:00
Matt Clarkson
40dc5c6d81 Variable abs shadows on gcc 4.6.3
Just make it a more explicit variable name, absolute
2015-05-22 16:06:06 +01:00
bel
13a6b935aa Avoid the missing-prototypes warning
Warning option -Wmissing-prototypes raises a warning for all functions
that are neither static nor in a header. Some functions should be available
only for main.c but not in the official header (civetweb.h) since they are
subject to changes. In order to avoid this warning, additional headers
outside the include folder must be added.
2015-05-22 00:08:40 +02:00
bel
10372ce328 Autoformat *.inl 2015-05-21 23:15:10 +02:00
bel
1b730992c9 Fix some gcc warnings 2015-05-21 22:45:33 +02:00
bel
b83ebccb0e Autoformat after merge (no code change) 2015-05-21 21:21:54 +02:00
bel
448563dc21 Resolve merge conflicts for #129 2015-05-21 20:45:49 +02:00
bel
9b4095f54d All macros should be enclosed by () 2015-05-17 12:58:39 +02:00
bel
6ce8b4e92c Set autoformat options and autoformat all source files 2015-05-17 01:30:21 +02:00
bel
53a18aecf1 Autoformat all source files using clang-format 2015-05-17 00:48:11 +02:00
bel
094b2fde7c Call Lua using the official interface in main 2015-05-15 00:35:23 +02:00
bel
c0de952b56 Fix clang compile error 2015-05-10 20:08:08 +02:00
bel
15dea85752 Disable 'MSVC deprecated POSIX' warning 2015-05-10 13:06:34 +02:00
bel
4921518ac3 Windows: Display error message if server does not start 2015-05-10 12:59:08 +02:00
bel
93fbcb33b1 All global variables in main should start with g_ 2015-05-01 21:47:28 +02:00
bel
de28718cae All global variables in main should start with g_ 2015-05-01 21:45:09 +02:00
bel
5e640884b2 All global variables in main should start with g_ 2015-05-01 21:42:57 +02:00
bel
5bbc219445 All global variables in main should start with g_ 2015-05-01 21:36:50 +02:00
bel
67c9d35e10 Avoid some Visual Studio redefinition warning 2015-04-27 21:37:55 +02:00
bel2125
fbaf61d6b8 Add Qt build 2015-04-25 20:42:03 +02:00
bel2125
acd1df40c9 Update to Lua 5.2.4 2015-03-29 20:51:42 +02:00
Danny Al-Gaaf
ec9d5413a8 replace Windows CRLF with Unix newline
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-23 16:38:15 +01:00
Eric Tsau
6d4e019c38 Fixes to enable building using MinGW-w64 or TDM-GCC 2015-03-22 00:46:06 +13:00
bel
b14ab7b00a Rewrite open all Lua libraries 2015-03-08 21:35:54 +01:00
bel
c70d1ecad8 Update copyright note to 2015 2015-02-03 23:18:59 +01:00
bel
ae404df3a8 Fix mingw compiler error 2015-02-02 23:22:00 +01:00
bel
59eb76c51a Better usage description in main 2014-12-04 22:57:27 +01:00
bel
bec21f1a74 Fix compile error with GCC 2014-10-01 19:35:04 +02:00
bel
ec902803d5 Create console and attach stdin/stdout/stderr 2014-09-12 23:20:47 +02:00
bel
d25755d4d0 Make Civetweb Lua state available from the command line, e.g. for easier script development 2014-09-12 22:52:17 +02:00
bel
de9870e7b9 Improve error handling in set_option 2014-08-16 01:12:22 +02:00
bel
a25d03617c Rewrite options argument handling (Step 1) 2014-08-13 23:04:21 +02:00
Thomas Davis
1461951d13 Compile fixes for OSX
Also fixed github URL's to point to correct project.
2014-06-26 17:38:05 -04:00
Danny Al-Gaaf
2d8fec839c main.c: fix another potential buffer overflow in strncat() call
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:45:22 +02:00
Danny Al-Gaaf
91f7daa9ed main.c: fix strncat call to prevent buffer overflow
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-05-13 16:43:28 +02:00
Danny Al-Gaaf
2e97ddc4db main.c: move 'guard' variable to _WIN32
Only needed in _WIN32 case. Otherwise unused.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-27 16:41:02 +02:00
Danny Al-Gaaf
ca9660e2fd main.c: use NULL for pointer
fix for cgcc warning:

src/main.c:238:48: warning: Using plain integer as NULL pointer
src/main.c:246:44: warning: Using plain integer as NULL pointer
src/main.c:418:17: warning: Using plain integer as NULL pointer

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 12:19:51 +02:00
Danny Al-Gaaf
92fcd83da3 main.c: fix -Wincompatible-pointer-types
Fix warning: passing 'char **' to parameter of type 'const char **' discards
qualifiers in nested pointer types [-Wincompatible-pointer-types]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-04-24 11:23:39 +02:00
bel
ca564eab93 Move windows console creation to a function 2014-04-18 23:09:02 +02:00
bel
44ae1530bd handle exit while the password dialog is open, rewrite password suggestion 2014-04-16 17:55:34 +02:00