[Date Prev][Date Next] [Chronological] [Thread] [Top]

SCO complitation error slap.h

Thanks for the tip.

I found the problem to be a define of f_next in /usr/include/sys/file.h as
below. I can only assume the file and filter definitions should have no

typedef struct file
        ushort  f_flag;
        cnt_t   f_count;                /* reference count */
        union {
                struct inode *f_uinode; /* pointer to inode structure */
                struct file  *f_unext;  /* pointer to next entry in freelist
        } f_up;
        union {
                off_t   f_off;
                struct  file *f_slnk;   /* XENIX semaphore queue */
        } f_un;
} file_t;

#define f_inode         f_up.f_uinode
#define f_next          f_up.f_unext
#define f_offset        f_un.f_off      /* read/write character pointer */

This gave the result below with the -E -dD repl.c > repl.i

typedef struct filter {
 unsigned long f_choice;

 union {

  char  *f_un_type;

  Ava  f_un_ava;

  struct filter *f_un_complex;

  struct sub {
   char *f_un_sub_type;
   char *f_un_sub_initial;
   char **f_un_sub_any;
   char *f_un_sub_final;
  } f_un_sub;
 } f_un;
#define f_type  f_un.f_un_type
#define f_ava  f_un.f_un_ava
#define f_avtype f_un.f_un_ava.ava_type
#define f_avvalue f_un.f_un_ava.ava_value
#define f_and  f_un.f_un_complex
#define f_or  f_un.f_un_complex
#define f_not  f_un.f_un_complex
#define f_list  f_un.f_un_complex
#define f_sub  f_un.f_un_sub
#define f_sub_type f_un.f_un_sub.f_un_sub_type
#define f_sub_initial f_un.f_un_sub.f_un_sub_initial
#define f_sub_any f_un.f_un_sub.f_un_sub_any
#define f_sub_final f_un.f_un_sub.f_un_sub_final

 struct filter * f_up.f_unext ;    <<<THE EXPANSION THAT THE COMPILER DIDN'T
} Filter;                                      <<< Yes there is a space
before the f_up.

I can only assume that this was not supposed to happen and the name confict
is a problem. I have recompiled commenting out the references to
<sys/files.h> in slapd/repl.c slapd/lock.c and slurpd/lock.c. It seems to
complile OK. Does anyone else have this conflict?

Stephen Collier
IT Manager
Panavision Australia