mirror of https://github.com/neutrinolabs/xrdp
Add autotools SIZEOF_INT macro
This commit is contained in:
parent
2ec28aca62
commit
d5f99f41ac
|
@ -46,6 +46,10 @@ AM_CONDITIONAL(OPENBSD, [test "x$openbsd" = xyes])
|
|||
AM_CONDITIONAL(NETBSD, [test "x$netbsd" = xyes])
|
||||
AM_CONDITIONAL(MACOS, [test "x$macos" = xyes])
|
||||
|
||||
AC_CHECK_SIZEOF([int])
|
||||
AC_CHECK_SIZEOF([long])
|
||||
AC_CHECK_SIZEOF([void *])
|
||||
|
||||
AC_ARG_WITH([socketdir],
|
||||
[AS_HELP_STRING([--with-socketdir=DIR],
|
||||
[Use directory for UNIX sockets (default: /tmp/.xrdp)])],
|
||||
|
|
24
xrdp/xrdp.c
24
xrdp/xrdp.c
|
@ -405,23 +405,17 @@ xrdp_sanity_check(void)
|
|||
#endif
|
||||
|
||||
/* check long, int and void* sizes */
|
||||
if (sizeof(int) != 4)
|
||||
{
|
||||
g_writeln("unusable int size, must be 4");
|
||||
return 1;
|
||||
}
|
||||
#if SIZEOF_INT != 4
|
||||
# error unusable int size, must be 4
|
||||
#endif
|
||||
|
||||
if (sizeof(long) != sizeof(void *))
|
||||
{
|
||||
g_writeln("long size must match void* size");
|
||||
return 1;
|
||||
}
|
||||
#if SIZEOF_LONG != SIZEOF_VOID_P
|
||||
# error sizeof(long) must match sizeof(void*)
|
||||
#endif
|
||||
|
||||
if (sizeof(long) != 4 && sizeof(long) != 8)
|
||||
{
|
||||
g_writeln("unusable long size, must be 4 or 8");
|
||||
return 1;
|
||||
}
|
||||
#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8
|
||||
# error sizeof(long), must be 4 or 8
|
||||
#endif
|
||||
|
||||
if (sizeof(tui64) != 8)
|
||||
{
|
||||
|
|
|
@ -315,23 +315,17 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* check long, int and void* sizes */
|
||||
if (sizeof(int) != 4)
|
||||
{
|
||||
g_writeln("unusable int size, must be 4");
|
||||
return 0;
|
||||
}
|
||||
#if SIZEOF_INT != 4
|
||||
# error unusable int size, must be 4
|
||||
#endif
|
||||
|
||||
if (sizeof(long) != sizeof(void *))
|
||||
{
|
||||
g_writeln("long size must match void* size");
|
||||
return 0;
|
||||
}
|
||||
#if SIZEOF_LONG != SIZEOF_VOID_P
|
||||
# error sizeof(long) must match sizeof(void*)
|
||||
#endif
|
||||
|
||||
if (sizeof(long) != 4 && sizeof(long) != 8)
|
||||
{
|
||||
g_writeln("unusable long size, must be 4 or 8");
|
||||
return 0;
|
||||
}
|
||||
#if SIZEOF_LONG != 4 && SIZEOF_LONG != 8
|
||||
# error sizeof(long), must be 4 or 8
|
||||
#endif
|
||||
|
||||
if (sizeof(tui64) != 8)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue