Subject: Re: sparc vs sparc64
To: matthew green <mrg@eterna.com.au>
From: Eduardo E. Horvath <eeh@one-o.com>
List: port-sparc
Date: 11/27/1999 09:59:00
> hi.  i noticed that we have these two differences here:
> 
> ! #define       _BSD_CLOCK_T_           unsigned long   /* clock() */
> ! #define       _BSD_TIME_T_            long            /* time() */
> --
> ! #define       _BSD_CLOCK_T_           int             /* clock() */
> ! #define       _BSD_TIME_T_            int             /* time() */
> 
> 
> two points:
> 	- clock_t is signed on the sparc64.  why?

I read someplace that some old (broken) userland code relies on time
being signed.  I think I snarfed these from the alpha port where:

#define	_BSD_CLOCK_T_		int		/* clock() */
#define	_BSD_PTRDIFF_T_		long		/* ptr1 - ptr2 */
#define	_BSD_SIZE_T_		unsigned long	/* sizeof() */
#define	_BSD_SSIZE_T_		long		/* byte count or error */
#define	_BSD_TIME_T_		int		/* time() */
typedef struct {
	char *__base;
	int __offset;
	int __pad;
} __va_list;
#define	_BSD_VA_LIST_		__va_list	/* va_list */
#define	_BSD_CLOCKID_T_		int		/* clockid_t */
#define	_BSD_TIMER_T_		int		/* timer_t */
#define	_BSD_SUSECONDS_T_	int		/* suseconds_t */
#define	_BSD_USECONDS_T_	unsigned int	/* useconds_t */
#define	_BSD_INTPTR_T_		long		/* intptr_t */
#define	_BSD_UINTPTR_T_		unsigned long	/* uintptr_t */

As you notice, all time values are `int' except `_BSD_USECONDS_T_'
which is `unsigned int'.

> 	- can't we change the sparc long's to int's so these files
> 	  can be identical?  i assume this has issues with the
> 	  compiler like the size_t change?  if so, doing it before
> 	  1.5 would be espcially good.
> 
> i'd like to make these "unsigned int" and "int" in both files.

I'd like to switch to "long" and "unsigned long" as long as we don't
break any standards so we can fix tye Y2038 bug.

Anybody know enough about standards to determine which of these we can
make 64-bits long?

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me