Subject: What is _STANDALONE?
To: None <tech-userlevel@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-userlevel
Date: 02/07/2003 17:12:57
I am building tendra (latest from their cvs).

I received:

"/usr/include/sys/cdefs.h", line 212: Error:
  [ISO 6.8.5]: "No function renaming possible".

I see /usr/include/sys/cdefs.h has:

#if !defined(_STANDALONE) && !defined(_KERNEL)
#ifdef __GNUC__
#define __RENAME(x)     ___RENAME(x)
#else
#ifdef __lint__
#define __RENAME(x)     __symbolrename(x)
#else
 #error "No function renaming possible"
#endif /* __lint__ */
#endif /* __GNUC__ */
#else /* _STANDALONE || _KERNEL */
#define __RENAME(x)     no renaming in kernel or standalone environment
#endif


So I defined _STANDALONE in my tendra build.

But later, I received:

"/usr/include/time.h", line 118: Error:
  [Syntax]: Parse error before 'no'.
  [Syntax]: Can't recover from this error.


This was from:

/*
 * X/Open Portability Guide >= Issue 4
 */
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
    (_XOPEN_SOURCE - 0) >= 4
extern int daylight;
#ifndef __LIBC12_SOURCE__
extern long int timezone __RENAME(__timezone13);
#endif
char *strptime __P((const char * __restrict, const char * __restrict,
    struct tm * __restrict));
#endif


Notice that the above __RENAME line was used. Shouldn't that only be used
if !defined(_STANDALONE) ??
But then what would it use?

Any advice would be appreciated.

   Jeremy C. Reed
   http://www.bsdnewsletter.com/

p.s. I didn't used _STANDALONE for an earlier test. I just did:
#define __RENAME(x)     ___RENAME(x)

but received:

"/usr/include/sys/bswap.h", line 21: Error:
  [Syntax]: Parse error before '__asm__'.
  [Syntax]: Can't recover from this error.