~ubuntu-branches/ubuntu/saucy/sane-backends/saucy

« back to all changes in this revision

Viewing changes to m4/byteorder.m4

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2011-02-14 14:28:56 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110214142856-6gxjetg88q9zctid
Tags: 1.0.22-0ubuntu1
* New upstream release
* debian/control:
  - Use standards version 3.9.1
* debian/patches/allow_dll.d_symlinks.patch:
* debian/patches/fix_epson2_cancel.patch:
* debian/patches/fix_epson2_commands.patch:
* debian/patches/fix_xerox_mfp_color_mode.patch:
* debian/patches/genesys_disable_raw_data_log.patch:
* debian/patches/no_translations.patch:
* debian/patches/saned_exit_avahi_process.patch:
* debian/patches/scsi_perfection_2450.patch:
* debian/patches/scsi_scanjet_4c.patch:
* debian/patches/xerox_mfp_new_ids.patch:
  - Applied upstream
* debian/watch:
  - Dropped, the URL is not consistent between releases

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
/* Define aliases for the standard byte swapping macros */
220
220
/* Arguments to these macros must be properly aligned on natural word */
221
221
/* boundaries in order to work properly on all architectures */
 
222
#ifndef htobe16
222
223
#define htobe16(x) htons(x)
 
224
#endif
 
225
#ifndef htobe32
223
226
#define htobe32(x) htonl(x)
 
227
#endif
 
228
#ifndef be16toh
224
229
#define be16toh(x) ntohs(x)
 
230
#endif
 
231
#ifndef be32toh
225
232
#define be32toh(x) ntohl(x)
 
233
#endif
226
234
 
227
235
#define HTOBE16(x) (x) = htobe16(x)
228
236
#define HTOBE32(x) (x) = htobe32(x)
234
242
 if test $ac_cv_c_bigendian = yes; then
235
243
  cat >> "$ac_byteorder" << EOF
236
244
/* Define our own extended byte swapping macros for big-endian machines */
 
245
#ifndef htole16
237
246
#define htole16(x)      swap16(x)
 
247
#endif
 
248
#ifndef htole32
238
249
#define htole32(x)      swap32(x)
 
250
#endif
 
251
#ifndef le16toh
239
252
#define le16toh(x)      swap16(x)
 
253
#endif
 
254
#ifndef le32toh
240
255
#define le32toh(x)      swap32(x)
 
256
#endif
241
257
 
 
258
#ifndef htobe64
242
259
#define htobe64(x)      (x)
 
260
#endif
 
261
#ifndef be64toh
243
262
#define be64toh(x)      (x)
 
263
#endif
244
264
 
245
265
#define HTOLE16(x)      (x) = htole16(x)
246
266
#define HTOLE32(x)      (x) = htole32(x)
254
274
 else
255
275
  cat >> "$ac_byteorder" << EOF
256
276
/* On little endian machines, these macros are null */
 
277
#ifndef htole16
257
278
#define htole16(x)      (x)
 
279
#endif
 
280
#ifndef htole32
258
281
#define htole32(x)      (x)
 
282
#endif
 
283
#ifndef htole64
259
284
#define htole64(x)      (x)
 
285
#endif
 
286
#ifndef le16toh
260
287
#define le16toh(x)      (x)
 
288
#endif
 
289
#ifndef le32toh
261
290
#define le32toh(x)      (x)
 
291
#endif
 
292
#ifndef le64toh
262
293
#define le64toh(x)      (x)
 
294
#endif
263
295
 
264
296
#define HTOLE16(x)      (void) (x)
265
297
#define HTOLE32(x)      (void) (x)
269
301
#define LE64TOH(x)      (void) (x)
270
302
 
271
303
/* These don't have standard aliases */
 
304
#ifndef htobe64
272
305
#define htobe64(x)      swap64(x)
 
306
#endif
 
307
#ifndef be64toh
273
308
#define be64toh(x)      swap64(x)
 
309
#endif
274
310
 
275
311
#define HTOBE64(x)      (x) = htobe64(x)
276
312
#define BE64TOH(x)      (x) = be64toh(x)