diff options
author | Ben Elliston <bje@au.ibm.com> | 2005-12-01 05:20:39 +0000 |
---|---|---|
committer | Ben Elliston <bje@gcc.gnu.org> | 2005-12-01 16:20:39 +1100 |
commit | 108ada44693fa7a5d1302da0a7fd0bbe9d538373 (patch) | |
tree | 65a8cb25499d2494e21f788a0dfe4b9ce175a236 /libdecnumber | |
parent | 8d11ad8ef4e19eaf642ae0e8cdcbf17336d7506f (diff) | |
download | gcc-108ada44693fa7a5d1302da0a7fd0bbe9d538373.tar.gz |
Makefile.in (libdecnumber_a_SOURCES): Drop decLibrary.c.
* Makefile.in (libdecnumber_a_SOURCES): Drop decLibrary.c.
* decUtility.c (__dec_byte_swap): Move from here ..
* decLibrary.c: .. to here.
From-SVN: r107802
Diffstat (limited to 'libdecnumber')
-rw-r--r-- | libdecnumber/ChangeLog | 6 | ||||
-rw-r--r-- | libdecnumber/Makefile.in | 2 | ||||
-rw-r--r-- | libdecnumber/decLibrary.c | 19 | ||||
-rw-r--r-- | libdecnumber/decUtility.c | 19 |
4 files changed, 26 insertions, 20 deletions
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index 22a73310ca9..f854e5b11ff 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,9 @@ +2005-12-01 Ben Elliston <bje@au.ibm.com> + + * Makefile.in (libdecnumber_a_SOURCES): Drop decLibrary.c. + * decUtility.c (__dec_byte_swap): Move from here .. + * decLibrary.c: .. to here. + 2005-11-23 Gerald Pfeifer <gerald@pfeifer.com> * decContext.h: Properly guard inclusion of stdint.h diff --git a/libdecnumber/Makefile.in b/libdecnumber/Makefile.in index c44d492afb2..9db0e846d7f 100644 --- a/libdecnumber/Makefile.in +++ b/libdecnumber/Makefile.in @@ -58,7 +58,7 @@ libdecnumber_a_OBJS = decNumber.o decContext.o decUtility.o \ decimal32.o decimal64.o decimal128.o libdecnumber_a_SOURCES = decContext.c decContext.h decDPD.h \ - decLibrary.c decNumber.c decNumber.h decNumberLocal.h \ + decNumber.c decNumber.h decNumberLocal.h \ decUtility.c decUtility.h \ decRound.c decimal128.c decimal128.h decimal32.c decimal32.h \ decimal64.c decimal64.h diff --git a/libdecnumber/decLibrary.c b/libdecnumber/decLibrary.c index 7cfd9b2b952..e12f413d1a3 100644 --- a/libdecnumber/decLibrary.c +++ b/libdecnumber/decLibrary.c @@ -80,3 +80,22 @@ __dfp_raise (int exception __attribute__ ((unused))) { raise (SIGFPE); } + +unsigned long +__dec_byte_swap (unsigned long in) +{ + unsigned long out; + unsigned char *p = (unsigned char *) &out; + union { + unsigned long i; + unsigned char b[4]; + } u; + + u.i = in; + p[0] = u.b[3]; + p[1] = u.b[2]; + p[2] = u.b[1]; + p[3] = u.b[0]; + + return out; +} diff --git a/libdecnumber/decUtility.c b/libdecnumber/decUtility.c index c1aa0fde229..cf02f550449 100644 --- a/libdecnumber/decUtility.c +++ b/libdecnumber/decUtility.c @@ -348,22 +348,3 @@ decDenseUnpackCoeff (uByte * bytes, Int len, decNumber * dn, dn->digits++; /* zero has one digit */ return; } - -unsigned long -__dec_byte_swap (unsigned long in) -{ - unsigned long out; - unsigned char *p = (unsigned char *) &out; - union { - unsigned long i; - unsigned char b[4]; - } u; - - u.i = in; - p[0] = u.b[3]; - p[1] = u.b[2]; - p[2] = u.b[1]; - p[3] = u.b[0]; - - return out; -} |