OSSP CVS Repository

ossp - Check-in [2116]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2116
Date: 2002-Apr-29 21:16:03 (local)
2002-Apr-29 19:16:03 (UTC)
User:rse
Branch:
Comment: add embedding support
Tickets:
Inspections:
Files:
ossp-pkg/ui64/ui64.h      1.2 -> 1.3     34 inserted, 0 deleted

ossp-pkg/ui64/ui64.h 1.2 -> 1.3

--- ui64.h       2002/04/28 18:58:01     1.2
+++ ui64.h       2002/04/29 19:16:03     1.3
@@ -33,6 +33,40 @@
 
 #include <string.h>
 
+/* embedding support */
+#ifdef UI64_PREFIX
+#if defined(__STDC__) || defined(__cplusplus)
+#define __UI64_CONCAT(x,y) x ## y
+#define UI64_CONCAT(x,y) __UI64_CONCAT(x,y)
+#else
+#define __UI64_CONCAT(x) x
+#define UI64_CONCAT(x,y) __UI64_CONCAT(x)y
+#endif
+#define ui64_t     UI64_CONCAT(UI64_PREFIX,ui64_t)
+#define ui64_zero  UI64_CONCAT(UI64_PREFIX,ui64_zero)
+#define ui64_max   UI64_CONCAT(UI64_PREFIX,ui64_max) 
+#define ui64_n2i   UI64_CONCAT(UI64_PREFIX,ui64_n2i) 
+#define ui64_i2n   UI64_CONCAT(UI64_PREFIX,ui64_i2n) 
+#define ui64_s2i   UI64_CONCAT(UI64_PREFIX,ui64_s2i) 
+#define ui64_i2s   UI64_CONCAT(UI64_PREFIX,ui64_i2s) 
+#define ui64_add   UI64_CONCAT(UI64_PREFIX,ui64_add) 
+#define ui64_addn  UI64_CONCAT(UI64_PREFIX,ui64_addn)
+#define ui64_sub   UI64_CONCAT(UI64_PREFIX,ui64_sub) 
+#define ui64_subn  UI64_CONCAT(UI64_PREFIX,ui64_subn)
+#define ui64_mul   UI64_CONCAT(UI64_PREFIX,ui64_mul) 
+#define ui64_muln  UI64_CONCAT(UI64_PREFIX,ui64_muln)
+#define ui64_div   UI64_CONCAT(UI64_PREFIX,ui64_div) 
+#define ui64_divn  UI64_CONCAT(UI64_PREFIX,ui64_divn)
+#define ui64_and   UI64_CONCAT(UI64_PREFIX,ui64_and) 
+#define ui64_or    UI64_CONCAT(UI64_PREFIX,ui64_or)  
+#define ui64_xor   UI64_CONCAT(UI64_PREFIX,ui64_xor) 
+#define ui64_not   UI64_CONCAT(UI64_PREFIX,ui64_not) 
+#define ui64_rol   UI64_CONCAT(UI64_PREFIX,ui64_rol) 
+#define ui64_ror   UI64_CONCAT(UI64_PREFIX,ui64_ror)  
+#define ui64_len   UI64_CONCAT(UI64_PREFIX,ui64_len)  
+#define ui64_cmp   UI64_CONCAT(UI64_PREFIX,ui64_cmp)
+#endif
+
 typedef struct {
     unsigned char x[8]; /* x_0, ..., x_7 */
 } ui64_t;

CVSTrac 2.0.1