repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gdb6
/
sim
/
erc32
/
end.c
blob
973fd796bf0f9372b184870e5a590349ac7e5925
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
}