Re: [COMMITTERS] 'pgsql/src/include/port linux.h'

Поиск
Список
Период
Сортировка
Искать

Re: [COMMITTERS] 'pgsql/src/include/port linux.h'

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> Bruce,
> 
> Could you check what was originally in linux.h before the 
> "#if if" problem.
> 
> My port is SPARC Linux, which now fails to compile because
> slock_t is no longer defined.
> 
> As you can see there is no reference to __sparc__ in the
> linux.h header file nor any default definition if the #if's
> fail.
> 
> I defined slock_t the same as i386 for sparc and things seem
> to be OK, although I'd be more comfortable if I knew what was
> originally there.
> 
> I don't have an unbroken copy of this file anymore.
> 

Good question.  The old code had:

	...
	#else                           /* i386 probably */
	typedef unsigned char slock_t;
	
	#endif

Doesn't engender confidence, does it?  Seeing as it used to work, I have
added:
	
	#elif defined(__sparc__)
	typedef unsigned char slock_t;

so it now explicitly has this lock for sparc, rather than falling into
an #else that could be any cpu.

-- 
  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
FAQ