Skip to content

Commit

Permalink
Buildy buildy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuehlner committed Nov 16, 2023
1 parent 47931d5 commit a911df5
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 23 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h time.h sys/time.h syslo

# Cygwin build
CYWGIN_LDFLAGS=
CYGWIN_CFLAGS=
CYGWIN_CFLAGS=-Werror -Wall -pedantic
AC_ARG_WITH([cygwin],
[AS_HELP_STRING([--with-cygwin],
[use Cygwin to build under Windows @<:@default=no@:>@])],
Expand All @@ -53,7 +53,7 @@ AM_CONDITIONAL([CYGWIN_BUILD], [test "x${with_cygwin}" = "xyes"])
if test "x$with_cygwin" = "xyes"
then
CYWGIN_LDFLAGS=-no-undefined
CYGWIN_CFLAGS=-Wno-error=expansion-to-defined
CYGWIN_CFLAGS=-Werror -Wall -Wno-error=expansion-to-defined
AC_DEFINE([CYGWIN_BUILD],,[Build against Cygwin on Windows])
fi

Expand Down
1 change: 0 additions & 1 deletion src/common-ssh/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ noinst_HEADERS = \
common-ssh/user.h

libguac_common_ssh_la_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@COMMON_INCLUDE@ \
@LIBGUAC_INCLUDE@
Expand Down
1 change: 0 additions & 1 deletion src/common-ssh/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ test_common_ssh_SOURCES = \
sftp/normalize_path.c

test_common_ssh_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@COMMON_INCLUDE@ \
@COMMON_SSH_INCLUDE@ \
Expand Down
1 change: 0 additions & 1 deletion src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ libguac_common_la_SOURCES = \
surface.c

libguac_common_la_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@LIBGUAC_INCLUDE@

Expand Down
1 change: 0 additions & 1 deletion src/common/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ test_common_SOURCES = \
string/split.c

test_common_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@COMMON_INCLUDE@

Expand Down
1 change: 0 additions & 1 deletion src/guacd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ guacd_SOURCES += move-pipe.c
endif

guacd_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@COMMON_INCLUDE@ \
@LIBGUAC_INCLUDE@
Expand Down
10 changes: 5 additions & 5 deletions src/libguac/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ noinst_HEADERS = \
encode-png.h \
palette.h \
user-handlers.h \
raw_encoder.h \
wait-fd.h
raw_encoder.h

libguac_la_SOURCES = \
argv.c \
Expand Down Expand Up @@ -116,7 +115,6 @@ libguac_la_SOURCES = \
user.c \
user-handlers.c \
user-handshake.c \
wait-fd.c \
wol.c

# Compile WebP support if available
Expand Down Expand Up @@ -145,11 +143,13 @@ libguac_la_SOURCES += wait-handle.c
libguacinc_HEADERS += guacamole/handle-helpers.h
libguacinc_HEADERS += guacamole/socket-handle.h
libguacinc_HEADERS += guacamole/wait-handle.h
else
libguac_la_SOURCES += wait-fd.c
libguacinc_HEADERS += guacamole/wait-fd.h
endif

libguac_la_CFLAGS = \
@CYGWIN_CFLAGS@ \
-Werror -Wall -pedantic
@CYGWIN_CFLAGS@

libguac_la_LDFLAGS = \
-version-info 22:0:1 \
Expand Down
9 changes: 5 additions & 4 deletions src/libguac/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

#ifdef CYGWIN_BUILD
#include <synchapi.h>
#include <threadpoollegacyapiset.h>
#endif

/**
Expand Down Expand Up @@ -518,13 +519,13 @@ static int guac_client_start_pending_users_timer(guac_client* client) {

#ifdef CYGWIN_BUILD
if (!CreateTimerQueueTimer(
&(client->__pending_users_timer)),
&(client->__pending_users_timer),
NULL,
guac_client_promote_pending_users,
client,
GUAC_CLIENT_PENDING_USERS_REFRESH_INTERVAL,
GUAC_CLIENT_PENDING_USERS_REFRESH_INTERVAL
0) {
GUAC_CLIENT_PENDING_USERS_REFRESH_INTERVAL,
0)) {

// oh noes error
return 1;
Expand All @@ -545,7 +546,6 @@ static int guac_client_start_pending_users_timer(guac_client* client) {
pthread_mutex_unlock(&(client->__pending_users_timer_mutex));
return 1;
}
#endif

/* Configure the pending users timer to run on the defined interval */
struct itimerspec time_config = {
Expand All @@ -560,6 +560,7 @@ static int guac_client_start_pending_users_timer(guac_client* client) {
pthread_mutex_unlock(&(client->__pending_users_timer_mutex));
return 1;
}
#endif

/* Mark the timer as registered but not yet running */
client->__pending_users_timer_state = GUAC_CLIENT_PENDING_TIMER_REGISTERED;
Expand Down
2 changes: 2 additions & 0 deletions src/libguac/guacamole/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* @file client.h
*/

#include "config.h"

#include "client-fntypes.h"
#include "client-types.h"
#include "client-constants.h"
Expand Down
5 changes: 3 additions & 2 deletions src/libguac/id.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@


#ifdef CYGWIN_BUILD
#include <rpc.h>
#include <rpcdce.h>
#elif defined(HAVE_LIBUUID)
#include <uuid/uuid.h>
Expand Down Expand Up @@ -58,7 +59,7 @@ char* guac_generate_id(char prefix) {

/* Convert the UUID to an all-caps, null-terminated tring */
RPC_CSTR uuid_string;
if (UuidToString(uuid, &uuid_string) == RPC_S_OUT_OF_MEMORY) {
if (UuidToString(&uuid, &uuid_string) == RPC_S_OUT_OF_MEMORY) {
guac_error = GUAC_STATUS_NO_MEMORY;
guac_error_message = "Could not allocate memory for unique ID";
return NULL;
Expand All @@ -68,7 +69,7 @@ char* guac_generate_id(char prefix) {
for (int i = 0; i < GUAC_UUID_LEN; i++)
identifier[i] = tolower(uuid_string[i]);

RpcStringFree(uuid_string);
RpcStringFree(&uuid_string);

#else

Expand Down
1 change: 0 additions & 1 deletion src/libguac/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ test_libguac_SOURCES = \


test_libguac_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@LIBGUAC_INCLUDE@

Expand Down
1 change: 0 additions & 1 deletion src/protocols/kubernetes/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test_kubernetes_SOURCES = \
url/escape.c

test_kubernetes_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@LIBGUAC_CLIENT_KUBERNETES_INCLUDE@ \
@LIBGUAC_INCLUDE@
Expand Down
1 change: 0 additions & 1 deletion src/protocols/rdp/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ test_rdp_SOURCES = \
fs/normalize_path.c

test_rdp_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@LIBGUAC_CLIENT_RDP_INCLUDE@ \
@LIBGUAC_INCLUDE@
Expand Down
1 change: 0 additions & 1 deletion src/protocols/vnc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ noinst_HEADERS = \
vnc.h

libguac_client_vnc_la_CFLAGS = \
-Werror -Wall -pedantic -Iinclude \
@CYGWIN_CFLAGS@ \
@COMMON_INCLUDE@ \
@COMMON_SSH_INCLUDE@ \
Expand Down
1 change: 0 additions & 1 deletion src/pulse/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ libguac_pulse_la_SOURCES = \
pulse.c

libguac_pulse_la_CFLAGS = \
-Werror -Wall -pedantic \
@CYGWIN_CFLAGS@ \
@LIBGUAC_INCLUDE@

Expand Down

0 comments on commit a911df5

Please sign in to comment.