projects
/
platform
/
upstream
/
binutils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
This commit was generated by cvs2svn to track changes on a CVS vendor
[platform/upstream/binutils.git]
/
sim
/
erc32
/
end.c
1
#include <stdio.h>
2
3
int
4
main()
5
{
6
7
unsigned int u1;
8
char *c;
9
double d1;
10
float *f1;
11
12
c = (char *) &u1;
13
u1 = 0x0F;
14
if (c[0] == 0x0F)
15
puts("#define HOST_LITTLE_ENDIAN\n");
16
else
17
puts("#define HOST_BIG_ENDIAN\n");
18
19
d1 = 1.0;
20
f1 = (float *) &d1;
21
if (*((int *) f1) != 0x3ff00000)
22
puts("#define HOST_LITTLE_ENDIAN_FLOAT\n");
23
else
24
puts("#define HOST_BIG_ENDIAN_FLOAT\n");
25
return 0;
26
}