summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <kiagiadakis.george@gmail.com>2010-11-10 18:57:13 +0000
committerJohannes Schindelin <johannes.schindelin@gmx.de>2011-04-28 11:42:59 +0200
commit35246edddd952a6d83511f69cba47536495e4700 (patch)
treeea10ab42c5c059dc245b1061068d3de49263daa9
parentd8fca9d013a8da92499cb3889dd0f53d3b4e437f (diff)
downloadlibvncserver-35246edddd952a6d83511f69cba47536495e4700.zip
libvncserver-35246edddd952a6d83511f69cba47536495e4700.tar.gz
Fix compilation in c89 mode.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r--common/zywrletemplate.c6
-rw-r--r--libvncserver/auth.c2
-rw-r--r--libvncserver/rfbserver.c6
-rw-r--r--libvncserver/scale.c2
-rw-r--r--libvncserver/scale.h2
-rw-r--r--rfb/rfb.h4
6 files changed, 13 insertions, 9 deletions
diff --git a/common/zywrletemplate.c b/common/zywrletemplate.c
index 52b2b0b..904de40 100644
--- a/common/zywrletemplate.c
+++ b/common/zywrletemplate.c
@@ -143,7 +143,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifdef WIN32
#define InlineX __inline
#else
-#define InlineX inline
+# ifndef __STRICT_ANSI__
+# define InlineX inline
+# else
+# define InlineX
+# endif
#endif
#ifdef ZYWRLE_ENCODE
diff --git a/libvncserver/auth.c b/libvncserver/auth.c
index c4c5ff1..52177e6 100644
--- a/libvncserver/auth.c
+++ b/libvncserver/auth.c
@@ -30,7 +30,7 @@
#include <rfb/rfb.h>
/* RFB 3.8 clients are well informed */
-void rfbClientSendString(rfbClientPtr cl, char *reason);
+void rfbClientSendString(rfbClientPtr cl, const char *reason);
/*
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c
index 70ae88b..8f0e390 100644
--- a/libvncserver/rfbserver.c
+++ b/libvncserver/rfbserver.c
@@ -636,7 +636,7 @@ rfbProcessClientProtocolVersion(rfbClientPtr cl)
void
-rfbClientSendString(rfbClientPtr cl, char *reason)
+rfbClientSendString(rfbClientPtr cl, const char *reason)
{
char *buf;
int len = strlen(reason);
@@ -661,7 +661,7 @@ rfbClientSendString(rfbClientPtr cl, char *reason)
void
rfbClientConnFailed(rfbClientPtr cl,
- char *reason)
+ const char *reason)
{
char *buf;
int len = strlen(reason);
@@ -1104,7 +1104,7 @@ rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer)
int DB = 1;
-rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer)
+rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, const char *buffer)
{
rfbFileTransferMsg ft;
ft.type = rfbFileTransfer;
diff --git a/libvncserver/scale.c b/libvncserver/scale.c
index 22f5597..6f91391 100644
--- a/libvncserver/scale.c
+++ b/libvncserver/scale.c
@@ -82,7 +82,7 @@ int ScaleY(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int y)
/* So, all of the encodings point to the ->screen->frameBuffer,
* We need to change this!
*/
-void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, char *function)
+void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, const char *function)
{
double x1,y1,w1,h1, x2, y2, w2, h2;
double scaleW = ((double) to->width) / ((double) from->width);
diff --git a/libvncserver/scale.h b/libvncserver/scale.h
index 13dd942..a030d4b 100644
--- a/libvncserver/scale.h
+++ b/libvncserver/scale.h
@@ -1,7 +1,7 @@
int ScaleX(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int x);
int ScaleY(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int y);
-void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, char *function);
+void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int *y, int *w, int *h, const char *function);
void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, int x0, int y0, int w0, int h0);
void rfbScaledScreenUpdate(rfbScreenInfoPtr screen, int x1, int y1, int x2, int y2);
rfbScreenInfoPtr rfbScaledScreenAllocate(rfbClientPtr cl, int width, int height);
diff --git a/rfb/rfb.h b/rfb/rfb.h
index 7c15bd8..fb8d892 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -704,7 +704,7 @@ extern rfbClientPtr rfbNewUDPClient(rfbScreenInfoPtr rfbScreen);
extern rfbClientPtr rfbReverseConnection(rfbScreenInfoPtr rfbScreen,char *host, int port);
extern void rfbClientConnectionGone(rfbClientPtr cl);
extern void rfbProcessClientMessage(rfbClientPtr cl);
-extern void rfbClientConnFailed(rfbClientPtr cl, char *reason);
+extern void rfbClientConnFailed(rfbClientPtr cl, const char *reason);
extern void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,int sock);
extern void rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen);
extern rfbBool rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr updateRegion);
@@ -720,7 +720,7 @@ extern void rfbSendBell(rfbScreenInfoPtr rfbScreen);
extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length);
extern rfbBool rfbSendFileTransferChunk(rfbClientPtr cl);
extern rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer);
-extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer);
+extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, const char *buffer);
extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length);
extern rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length);
OpenPOWER on IntegriCloud