-
-#define AUX_GET_DNLOW(bigend, ax) (bigend? _do_getb32 ((ax)->a_dnLow): \
- _do_getl32 ((ax)->a_dnLow))
-#define AUX_GET_DNHIGH(bigend, ax) (bigend? _do_getb32 ((ax)->a_dnHigh): \
- _do_getl32 ((ax)->a_dnHigh))
-#define AUX_GET_ISYM(bigend, ax) (bigend? _do_getb32 ((ax)->a_isym): \
- _do_getl32 ((ax)->a_isym))
-#define AUX_GET_ISS(bigend, ax) (bigend? _do_getb32 ((ax)->a_iss): \
- _do_getl32 ((ax)->a_iss))
-#define AUX_GET_WIDTH(bigend, ax) (bigend? _do_getb32 ((ax)->a_width): \
- _do_getl32 ((ax)->a_width))
-#define AUX_GET_COUNT(bigend, ax) (bigend? _do_getb32 ((ax)->a_count): \
- _do_getl32 ((ax)->a_count))
+extern void _do_putb32 PARAMS ((bfd_vma data, unsigned char *addr));
+extern void _do_putl32 PARAMS ((bfd_vma data, unsigned char *addr));
+
+#define AUX_GET_ANY(bigend, ax, field) \
+ ((bigend) ? _do_getb32 ((ax)->field) : _do_getl32 ((ax)->field))
+
+#define AUX_GET_DNLOW(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnLow)
+#define AUX_GET_DNHIGH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_dnHigh)
+#define AUX_GET_ISYM(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_isym)
+#define AUX_GET_ISS(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_iss)
+#define AUX_GET_WIDTH(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_width)
+#define AUX_GET_COUNT(bigend, ax) AUX_GET_ANY ((bigend), (ax), a_count)
+
+#define AUX_PUT_ANY(bigend, val, ax, field) \
+ ((bigend) \
+ ? _do_putb32 ((val), (ax)->field) \
+ : _do_putl32 ((val), (ax)->field))
+
+#define AUX_PUT_DNLOW(bigend, val, ax) \
+ AUX_PUT_ANY ((bigend), (val), (ax), a_dnLow)
+#define AUX_PUT_DNHIGH(bigend, val, ax) \
+ AUX_PUT_ANY ((bigend), (val), (ax), a_dnHigh)
+#define AUX_PUT_ISYM(bigend, val, ax) \
+ AUX_PUT_ANY ((bigend), (val), (ax), a_isym)
+#define AUX_PUT_ISS(bigend, val, ax) \
+ AUX_PUT_ANY ((bigend), (val), (ax), a_iss)
+#define AUX_PUT_WIDTH(bigend, val, ax) \
+ AUX_PUT_ANY ((bigend), (val), (ax), a_width)
+#define AUX_PUT_COUNT(bigend, val, ax) \
+ AUX_PUT_ANY ((bigend), (val), (ax), a_count)