vision-dbms / vision

The master repository for the Vision database system.
https://vision-dbms.com
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

Linux build and file permission book-keeping #1

Closed MichaelJCaruso closed 7 years ago

MichaelJCaruso commented 7 years ago

This pull request addresses a number of issues discovered building vision. Here's what's included:

VCommitter commented 7 years ago

right now adding in a struct sigvec definition on Linux breaks many builds. We'll have to find a way to do this that doesn't break older versions of gcc on linux.

VCommitter commented 7 years ago

Mike, does checking for __USE_BSD keep things compiling on your end? Specifically I tried:

#if defined(sun) || defined(__linux__) && !defined(__USE_BSD)

Which the compile work on our older gcc/Linux and I'm hoping will still compile for you on Ubuntu.

From the signal.h on one of the distro's I'm testing on:

#ifdef __USE_BSD

/* Names of the signals.  This variable exists only for compatibility.
   Use `strsignal' instead (see <string.h>).  */
extern __const char *__const _sys_siglist[_NSIG];
extern __const char *__const sys_siglist[_NSIG];

/* Structure passed to `sigvec'.  */
struct sigvec
  {
    __sighandler_t sv_handler;  /* Signal handler.  */
    int sv_mask;    /* Mask of signals to be blocked.  */

    int sv_flags;   /* Flags (see below).  */
# define sv_onstack sv_flags /* 4.2 BSD compatibility.  */
  };

/* Bits in `sv_flags'.  */
# define SV_ONSTACK (1 << 0)/* Take the signal on the signal stack.  */
# define SV_INTERRUPT (1 << 1)/* Do not restart system calls.  */
# define SV_RESETHAND (1 << 2)/* Reset handler to SIG_DFL on receipt.  */

/* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member
   of VEC.  The signals in `sv_mask' will be blocked while the handler runs.
   If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
   reset to SIG_DFL before `sv_handler' is entered.  If OVEC is non-NULL,
   it is filled in with the old information for SIG.  */
extern int sigvec (int __sig, __const struct sigvec *__vec,
       struct sigvec *__ovec) __THROW;

/* Get machine-dependent `struct sigcontext' and signal subcodes.  */
# include <bits/sigcontext.h>

/* Restore the state saved in SCP.  */
extern int sigreturn (struct sigcontext *__scp) __THROW;

#endif /*  use BSD.  */