Fix stupid mistake in previous commit (use 'long double' instead of 'ld' in istandard library macro)
authormjsousa
Sun, 06 Jul 2014 10:16:48 +0100
changeset 903 f712705bef65
parent 902 38dca2e264b6
child 904 423ea3749212
Fix stupid mistake in previous commit (use 'long double' instead of 'ld' in istandard library macro)
lib/iec_std_lib.h
--- a/lib/iec_std_lib.h	Sat Jul 05 14:10:28 2014 +0100
+++ b/lib/iec_std_lib.h	Sun Jul 06 10:16:48 2014 +0100
@@ -223,16 +223,14 @@
  *       They are therefore commented out. This however means that any change to the definition of IEC_TIMESPEC may require this
  *       macro to be updated too!
  */
-#define ld long double
 #define __time_to_timespec(sign,mseconds,seconds,minutes,hours,days) \
           ((IEC_TIMESPEC){\
-              /*tv_sec  =*/ ((long int)   (((sign>=0)?1:-1)*((((ld)days*24 + (ld)hours)*60 + (ld)minutes)*60 + (ld)seconds + (ld)mseconds/1e3))), \
+              /*tv_sec  =*/ ((long int)   (((sign>=0)?1:-1)*((((long double)days*24 + (long double)hours)*60 + (long double)minutes)*60 + (long double)seconds + (long double)mseconds/1e3))), \
               /*tv_nsec =*/ ((long int)(( \
-                            ((long double)(((sign>=0)?1:-1)*((((ld)days*24 + (ld)hours)*60 + (ld)minutes)*60 + (ld)seconds + (ld)mseconds/1e3))) - \
-                            ((long int)   (((sign>=0)?1:-1)*((((ld)days*24 + (ld)hours)*60 + (ld)minutes)*60 + (ld)seconds + (ld)mseconds/1e3)))   \
+                            ((long double)(((sign>=0)?1:-1)*((((long double)days*24 + (long double)hours)*60 + (long double)minutes)*60 + (long double)seconds + (long double)mseconds/1e3))) - \
+                            ((long int)   (((sign>=0)?1:-1)*((((long double)days*24 + (long double)hours)*60 + (long double)minutes)*60 + (long double)seconds + (long double)mseconds/1e3)))   \
                             )*1e9))\
         })
-#undef ld
 
 
 
@@ -250,16 +248,14 @@
   return ts;
 }
 */
-#define ld long double
 #define __tod_to_timespec(seconds,minutes,hours) \
           ((IEC_TIMESPEC){\
-              /*tv_sec  =*/ ((long int)   ((((ld)hours)*60 + (ld)minutes)*60 + (ld)seconds)), \
+              /*tv_sec  =*/ ((long int)   ((((long double)hours)*60 + (long double)minutes)*60 + (long double)seconds)), \
               /*tv_nsec =*/ ((long int)(( \
-                            ((long double)((((ld)hours)*60 + (ld)minutes)*60 + (ld)seconds)) - \
-                            ((long int)   ((((ld)hours)*60 + (ld)minutes)*60 + (ld)seconds))   \
+                            ((long double)((((long double)hours)*60 + (long double)minutes)*60 + (long double)seconds)) - \
+                            ((long int)   ((((long double)hours)*60 + (long double)minutes)*60 + (long double)seconds))   \
                             )*1e9))\
         })
-#undef ld
 
 
 #define EPOCH_YEAR 1970