This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: atoll, llabs and lldiv


And (was forgotten) the patch (attached) should be applied to include/stdlib.h to add lldiv_t definition.


Artem B. Bityuckiy wrote:


Hello.

We've ported three functions from FreeBSD: llabs, lldiv and atoll (all of them are from stdlib/).

They are rather trivial and I didn't test them therefore.

We've added documentation header, please, check it.

Also, I'm not sending a patch to stdlib/Makefile.am since I think it's unneeded.

And question: is there any option in Newlib that switches on/off long long support? If so, these functions should be segregated by the appropriate macroses.


--
Best regards,
Artem B. Bityuckiy
SoftMine Corporation, Software Engineer
Tel.: +7(812)329-67-44, +7(812)329-67-45
Mobile: +79112449030
E-mail: abitytsky@softminecorp.com
Web: www.softminecorp.com

--- /home/dedekind/work/AnonymousCVSes/Newlib/src/newlib/libc/include/stdlib.h	2003-11-20 15:02:24.000000000 +0300
+++ newlib/libc/include/stdlib.h	2003-11-25 21:58:12.000000000 +0300
@@ -33,6 +33,12 @@
   long rem; /* remainder */
 } ldiv_t;
 
+typedef struct
+{
+  long long int quot; /* quotient */
+  long long int rem; /* remainder */
+} lldiv_t;
+
 #ifndef NULL
 #define NULL 0
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]