Skip to content
Snippets Groups Projects
Commit 0430da7d authored by bje's avatar bje
Browse files

* Makefile.in (libdecnumber_a_SOURCES): Drop decLibrary.c.

	* decUtility.c (__dec_byte_swap): Move from here ..
	* decLibrary.c: .. to here.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107802 138bc75d-0d04-0410-961f-82ee72b054a4
parent 25cdd62a
No related branches found
No related tags found
No related merge requests found
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
......
......@@ -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
......
......@@ -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;
}
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment