Re: Compiling on BSDI BSD/OS 4.0

From: The Merciless Lord of Everything (serces@mud.dk)
Date: 02/04/00


On Fri, 4 Feb 2000, Chris Proctor wrote:

> only in recent releases I don't know, but you have to add -lcrypt to the
> compilation flags . . .
crypt library is in FreeBSD by default, but DES is not. (Export
regulations and so on. :( ), and that is what fails when you take a Linux
run playerfile and try to use it under FBSD.

FreeBSD can get DES installed though, but only if certain specific things
are in place. (And those I cannot remember right now)

OBSomethingElse:
Another thing about FreeBSD (I've not tried the other *BSD's) is it's
free(), e.g. I've fought for some time with a bug of freeing a
nullpointer, compiled under Linux mud simply crashed with a sigfault,
FreeBSD ran on as if nothing had happend. Investigating this, I found that
at least FreeBSD looks at what you're trying to Free, and if it is "null",
it decides "Why free it then??", perhaps in some opinions not the best
solution.

But it made me wonder, how to make a Circle-Free, ie, imitiate the FreeBSD
free(). Problem is how to look at what you're trying to free, so far I
would imagine the function to look something like this (Not this will
*NOT* work, it's only in concept):

void circle_free (void *to_be_freed, char *calling_function)
{

  if (!*to_be_freed) { /* Must be a null or something */
    log("Trying to free a null pointer in %s!",calling_function);
    return;
  } else {
    free(to_be_freed);
  }
}

hope the Concept is clear. Any idea on how to make this (Of course I could
dig into the FreeBSD code and see how it's done there.. :)

/S


"The Law of Self Sacrifice"
When you starve with a tiger, the tiger starves last.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT