rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] more strangeness with 0.12.1


From: Ben Escoto
Subject: Re: [rdiff-backup-users] more strangeness with 0.12.1
Date: Wed, 23 Jul 2003 13:02:48 -0700

>>>>> "DS" == Dave Steinberg <address@hidden>
>>>>> wrote the following on Wed, 23 Jul 2003 11:35:09 -0400

  DS> The new way is the preferred way on OpenBSD to do it, to the
  DS> point where the original port (that I maintain a private copy
  DS> of) included a patch the do exactly the above.  I imagine
  DS> omitting it wouldn't play nicely on mixed endian and 32 vs 64
  DS> bit machines.  But that¹s just my own fud.  I can always patch
  DS> my private copy.

I just meant that he could change his own private copy.  But it does
raise the issue of what is the right way to do it.  Does this look ok
to both of you?

/* Some of the following code to define major/minor taken from code by
 * Jörg Schilling's star archiver.
 */
#if !defined(major) && (defined(sgi) || defined(__sgi) || defined(__SVR4)) && 
!defined(__CYGWIN32__)
#include <sys/mkdev.h>
#endif

#ifndef major
#       define major(dev)               (((dev) >> 8) & 0xFF)
#       define minor(dev)               ((dev) & 0xFF)
#       define makedev(majo, mino)      (((majo) << 8) | (mino))
#endif
/* End major/minor section */

As usual when it comes to C I end up cutting and pasting code that
looks like it was determined by trial and error...

BTW, this is probably a stupid question, but if major/minor was
undefined, why did it compile correctly?


-- 
Ben Escoto

Attachment: pgpG4Igyvqp5H.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]