OK, folks, I need help on this one.  We use the new structure slock_t,
but it is not defined in all include/port/*.h files.  It is missing in:
	
	#$ ls *.h |diff - /tmp/x
	< dgux.h
	< sco.h
	< sunos4.h
	< ultrix4.h
	< win32.h

If any of these ports tries to access the locking code, the compile will
fail, or is that wrong?  I thought sco works, or is that unixware works?
sunos4 seems to require it, and doesn't have it.

Can someone knowledgeable about this area supply a patch?


> 
> 	I decided to build the current on my 4.1.4 system. No luck - there is
> the usual missing def's for fprintf, printf... which are easy to list for
> a possible massive #include for sunsos builds - I can send you the list later.
> The main problem is in s_lock.c
> 
> ....
> gcc -I../../../include -I../../../backend     -Wall -Wmissing-prototypes 
> -I../..
>    -c s_lock.c -o s_lock.o
> s_lock.c:43: warning: type defaults to `int' in declaration of `slock_t'
> s_lock.c:43: parse error before `*'
> s_lock.c: In function `s_lock_stuck':
> s_lock.c:47: `lock' undeclared (first use in this function)
> s_lock.c:47: (Each undeclared identifier is reported only once
> s_lock.c:47: for each function it appears in.)
> s_lock.c:47: `file' undeclared (first use in this function)
> s_lock.c:47: `line' undeclared (first use in this function)
> s_lock.c: At top level:
> s_lock.c:60: warning: type defaults to `int' in declaration of `slock_t'
> s_lock.c:60: parse error before `*'
> s_lock.c:61: warning: no previous prototype for `s_lock'
> s_lock.c: In function `s_lock':
> s_lock.c:64: warning: implicit declaration of function `TAS'
> s_lock.c:64: `lock' undeclared (first use in this function)
> s_lock.c:74: `file' undeclared (first use in this function)
> s_lock.c:74: `line' undeclared (first use in this function)
> gmake[3]: *** [s_lock.o] Error 1
> ...
> 
>  which means that .o never is built and much later the entire build fails.
> 
> 	Since you last checked out this file - I figured you might want to
> take a stab at it. I am open to suggestions before I try to puzzle it out.
> 
> -- 
> 	Stephen N. Kogge
> 	stevek@uimage.com
> 	http://www.uimage.com
> 
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sun, 15 Nov 1998 22:10:57 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: Postgres for Sunos 4.1.4
> 
> 	I decided to build the current on my 4.1.4 system. No luck - there is
> the usual missing def's for fprintf, printf... which are easy to list for
> a possible massive #include for sunsos builds - I can send you the list later.
> The main problem is in s_lock.c
> 
> ....
> gcc -I../../../include -I../../../backend     -Wall -Wmissing-prototypes 
> -I../..
>    -c s_lock.c -o s_lock.o
> s_lock.c:43: warning: type defaults to `int' in declaration of `slock_t'
> s_lock.c:43: parse error before `*'
> s_lock.c: In function `s_lock_stuck':
> s_lock.c:47: `lock' undeclared (first use in this function)
> s_lock.c:47: (Each undeclared identifier is reported only once
> s_lock.c:47: for each function it appears in.)
> s_lock.c:47: `file' undeclared (first use in this function)
> s_lock.c:47: `line' undeclared (first use in this function)
> s_lock.c: At top level:
> s_lock.c:60: warning: type defaults to `int' in declaration of `slock_t'
> s_lock.c:60: parse error before `*'
> s_lock.c:61: warning: no previous prototype for `s_lock'
> s_lock.c: In function `s_lock':
> s_lock.c:64: warning: implicit declaration of function `TAS'
> s_lock.c:64: `lock' undeclared (first use in this function)
> s_lock.c:74: `file' undeclared (first use in this function)
> s_lock.c:74: `line' undeclared (first use in this function)
> gmake[3]: *** [s_lock.o] Error 1
> ...
> 
>  which means that .o never is built and much later the entire build fails.
> 
> 	Since you last checked out this file - I figured you might want to
> take a stab at it. I am open to suggestions before I try to puzzle it out.
> 

Can you try this and let me know:

---------------------------------------------------------------------------

*** ./s_lock.c.orig	Sat Dec 12 21:22:33 1998
--- ./s_lock.c	Sat Dec 12 21:22:43 1998
***************
*** 30,37 ****
  #define S_NSPINCYCLE	20
  #define S_MAX_BUSY		500 * S_NSPINCYCLE
  
! int			s_spincycle[S_NSPINCYCLE] =
! {0, 0, 0, 0, 10000, 0, 0, 0, 10000, 0,
  	0, 10000, 0, 0, 10000, 0, 10000, 0, 10000, 10000
  };
  
--- 30,37 ----
  #define S_NSPINCYCLE	20
  #define S_MAX_BUSY		500 * S_NSPINCYCLE
  
! int			s_spincycle[S_NSPINCYCLE] = {
! 0, 0, 0, 0, 10000, 0, 0, 0, 10000, 0,
  	0, 10000, 0, 0, 10000, 0, 10000, 0, 10000, 10000
  };
  


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sat, 12 Dec 1998 21:23:32 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: Postgres for Sunos 4.1.4