kopia lustrzana https://gitlab.com/Teuniz/DSRemote
Fix regression bug that prevented compilation on 32-bit systems e.g. Raspberry Pi.
rodzic
76e3679c4f
commit
c7bc6d1f81
2
global.h
2
global.h
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
#define PROGRAM_NAME "DSRemote"
|
||||
#define PROGRAM_VERSION "0.38_2302082035"
|
||||
#define PROGRAM_VERSION "0.39_2302091112"
|
||||
|
||||
#define MAX_PATHLEN (1024)
|
||||
|
||||
|
|
15
main.cpp
15
main.cpp
|
@ -33,7 +33,6 @@ int main(int argc, char *argv[])
|
|||
if((sizeof(char) != 1) ||
|
||||
(sizeof(short) != 2) ||
|
||||
(sizeof(int) != 4) ||
|
||||
(sizeof(long) != 8) ||
|
||||
(sizeof(long long) != 8) ||
|
||||
(sizeof(float) != 4) ||
|
||||
(sizeof(double) != 8))
|
||||
|
@ -42,6 +41,20 @@ int main(int argc, char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
#if defined(__LP64__)
|
||||
if(sizeof(long) != 8)
|
||||
{
|
||||
fprintf(stderr, "Wrong compiler or platform!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#else
|
||||
if(sizeof(long) != 4)
|
||||
{
|
||||
fprintf(stderr, "Wrong compiler or platform!\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* check endianness! */
|
||||
byte_order_test_var.one = 0x03020100;
|
||||
if((byte_order_test_var.four[0] != 0) ||
|
||||
|
|
Ładowanie…
Reference in New Issue