003 File Manager
Current Path:
/usr/src/contrib/ntp/util
usr
/
src
/
contrib
/
ntp
/
util
/
📁
..
📄
Makefile.am
(4.74 KB)
📄
Makefile.in
(49.93 KB)
📄
README
(2.13 KB)
📄
audio-pcm.c
(3.57 KB)
📄
byteorder.c
(839 B)
📄
hist.c
(1.94 KB)
📄
invoke-ntp-keygen.menu
(55 B)
📄
invoke-ntp-keygen.texi
(50.06 KB)
📄
jitter.c
(2.73 KB)
📄
kern.c
(5.45 KB)
📄
longsize.c
(150 B)
📄
ntp-keygen-opts.c
(61.04 KB)
📄
ntp-keygen-opts.def
(38.96 KB)
📄
ntp-keygen-opts.h
(12.77 KB)
📄
ntp-keygen.1ntp-keygenman
(45.69 KB)
📄
ntp-keygen.1ntp-keygenmdoc
(39.57 KB)
📄
ntp-keygen.c
(64.46 KB)
📄
ntp-keygen.html
(90.46 KB)
📄
ntp-keygen.man.in
(45.69 KB)
📄
ntp-keygen.mdoc.in
(39.57 KB)
📄
ntp-keygen.texi
(12.96 KB)
📄
ntptime.c
(10.27 KB)
📄
pps-api.c
(2.3 KB)
📄
precision.c
(5.06 KB)
📄
sht.c
(6.09 KB)
📄
testrs6000.c
(1.28 KB)
📄
tg.c
(16.43 KB)
📄
tg2.c
(73.01 KB)
📄
tickadj.c
(16.02 KB)
📄
timetrim.c
(2.65 KB)
Editing: byteorder.c
/* * This works on: * Crays * Conven * sparc's * Dec mip machines * Dec alpha machines * RS6000 * SGI's */ #include <stdio.h> int main( int argc, char *argv[] ) { int i; int big; union { unsigned long l; char c[sizeof(long)]; } u; #if defined(LONG8) u.l = (((long)0x08070605) << 32) | (long)0x04030201; #else u.l = 0x04030201; #endif if (sizeof(long) > 4) { if (u.c[0] == 0x08) big = 1; else big = 0; } else { if (u.c[0] == 0x04) big = 1; else big = 0; } for (i=0; i< sizeof(long); i++) { if (big == 1 && (u.c[i] == (sizeof(long) - i))) { continue; } else if (big == 0 && (u.c[i] == (i+1))) { continue; } else { big = -1; break; } } if (big == 1) { printf("XNTP_BIG_ENDIAN\n"); } else if (big == 0) { printf("XNTP_LITTLE_ENDIAN\n"); } exit(0); }
Upload File
Create Folder