summaryrefslogtreecommitdiff
path: root/cdrwtool/cdrwtool.h
diff options
context:
space:
mode:
Diffstat (limited to 'cdrwtool/cdrwtool.h')
-rw-r--r--cdrwtool/cdrwtool.h33
1 files changed, 7 insertions, 26 deletions
diff --git a/cdrwtool/cdrwtool.h b/cdrwtool/cdrwtool.h
index af6aa64..aed38fd 100644
--- a/cdrwtool/cdrwtool.h
+++ b/cdrwtool/cdrwtool.h
@@ -10,7 +10,7 @@
#ifndef _CDRWTOOL_H
#define _CDRWTOOL_H 1
-#include <inttypes.h>
+#include <stdint.h>
#include <linux/cdrom.h>
#include "../include/libudffs.h"
@@ -91,47 +91,29 @@ struct cdrw_disc
struct udf_disc udf_disc;
};
-#ifndef be16_to_cpu
-#define be16_to_cpu(x) \
- ((uint16_t)( \
- (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \
- (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) ))
-#endif
-
-#ifndef be32_to_cpu
-#define be32_to_cpu(x) \
- ((uint32_t)( \
- (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
- (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
- (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
- (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) ))
-#endif
-
typedef struct disc_info {
uint16_t length;
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
unsigned char reserved1 : 3;
unsigned char erasable : 1;
unsigned char border : 2;
unsigned char status : 2;
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#else
unsigned char status : 2;
unsigned char border : 2;
unsigned char erasable : 1;
unsigned char reserved1 : 3;
-#else
-#error "<bits/endian.h> is wack"
#endif
uint8_t n_first_track;
uint8_t n_sessions_l;
uint8_t first_track_l;
uint8_t last_track_l;
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
unsigned char did_v : 1;
unsigned char dbc_v : 1;
unsigned char uru : 1;
unsigned char reserved2 : 5;
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#else
unsigned char reserved2 : 5;
unsigned char uru : 1;
unsigned char dbc_v : 1;
@@ -160,7 +142,7 @@ typedef struct track_info {
uint8_t track_number_l;
uint8_t session_number_l;
uint8_t reserved1;
-#if __BYTE_ORDER == __BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
uint8_t reserved2 : 2;
uint8_t damage : 1;
uint8_t copy : 1;
@@ -173,7 +155,7 @@ typedef struct track_info {
uint8_t reserved3 : 6;
uint8_t lra_v : 1;
uint8_t nwa_v : 1;
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#else
uint8_t track_mode : 4;
uint8_t copy : 1;
uint8_t damage : 1;
@@ -237,6 +219,5 @@ int print_disc_track_info(int);
void make_write_page(write_params_t *, struct cdrw_disc *);
void print_params(write_params_t *);
void cdrw_init_disc(struct cdrw_disc *);
-int udf_set_version(struct udf_disc *, int);
#endif /* _CDRWTOOL_H */