/*
 * @DEC_COPYRIGHT@
 */
/*
 * HISTORY
 * $Log:	standards.h,v $
 * Revision 4.2.2.3  92/03/27  15:30:22  Craig_Horman
 * 	Merge with AG
 * 	[92/03/27  14:05:38  Craig_Horman]
 * 
 * 	Merge with BL5
 * 	[92/03/10  12:02:20  Craig_Horman]
 * 
 * 	Added C++ Support
 * 	[92/02/26  17:18:44  Craig_Horman]
 * 
 * Revision 4.2.2.2  91/12/05  14:14:54  Jim_McHale
 * 	"Integrate with AG pool"
 * 
 * Revision 4.2.1.2  91/11/22  17:05:39  Jim_McHale
 * 	Merge with mips 3.0
 * 
 * Revision 4.2  91/09/20  05:13:45  devbld
 * 	Adding ODE Headers
 * 
 * $EndLog$
 */
/*	
 *	@(#)$RCSfile: standards.h,v $ $Revision: 4.2.2.3 $ (DEC) $Date: 92/03/27 15:30:22 $
 */ 
/*
 * (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
 * ALL RIGHTS RESERVED
 */
/*
 * OSF/1 Release 1.0
 */
/*
 * standards.h
 *
 *	Modification History:
 *
 * 11-Apr-91	Peter H. Smith
 *	If _POSIX_4SOURCE is defined, define _POSIX_SOURCE if it isn't
 *      already defined.
 *
 * 01-Apr-91	Fred Canter
 *	MIPS C 2.20+, changes for -std
 *
 */

/*
 * COMPONENT_NAME: standards.h
 *                                                                    
 * ORIGIN: IBM
 *
  * Copyright International Business Machines Corp. 1988
 * All Rights Reserved
 * Licensed Material - Property of IBM
 *
 * RESTRICTED RIGHTS LEGEND
 * Use, Duplication or Disclosure by the Government is subject to
 * restrictions as set forth in paragraph (b)(3)(B) of the Rights in
 * Technical Data and Computer Software clause in DAR 7-104.9(a).
 */                                                                   
#ifndef _STANDARDS_H_
#define _STANDARDS_H_

/*
 * If _POSIX_4SOURCE was turned on explicitly, make sure that _POSIX_SOURCE
 * is also turned on.
 */

#ifdef  _POSIX_4SOURCE
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE 1
#endif
#endif

#ifdef _POSIX_SOURCE
#define _ANSI_C_SOURCE
#endif

#ifdef _XOPEN_SOURCE
#define _POSIX_SOURCE
#define _ANSI_C_SOURCE
#endif

#ifdef _AES_SOURCE
#define _XOPEN_SOURCE
#define _POSIX_SOURCE
#define _ANSI_C_SOURCE
#endif

#if (!defined (_XOPEN_SOURCE)) &&  (!defined (_POSIX_SOURCE)) && (!defined (_ANSI_C_SOURCE)) && (!defined (_AES_SOURCE)) && (!defined (__LANGUAGE_ASSEMBLY__))
#define _AES_SOURCE
#define _XOPEN_SOURCE
#define _POSIX_SOURCE
#define _ANSI_C_SOURCE
#define _OSF_SOURCE
#endif

#ifdef __LANGUAGE_ASSEMBLY__
#define _OSF_SOURCE
#endif

/* automation for non ANSI compilers */
/*
 * GNU and MIPS C compilers define __STDC__ differently.
 *	MIPS: -std0 = undefined, -std = 0, -std1 = 1
 *	GNU:  -traditional = undefined, otherwise = 1
 */
#ifdef __GNUC__

#if !__STDC__
#ifndef _NO_PROTO
#define _NO_PROTO
#endif
#ifndef _NONSTD_TYPES
#define _NONSTD_TYPES
#endif
#endif

#else	/* !__GNUC__ */

#if !defined(__STDC__) && !defined(__cplusplus)
#ifndef _NO_PROTO
#define _NO_PROTO
#endif
#ifndef _NONSTD_TYPES
#define _NONSTD_TYPES
#endif
#endif

#if defined(__cplusplus)
#define __LANGUAGE_C__
#endif

#endif	/* __GNUC__ */

#ifdef _NO_PROTO
#define __(args)	()
#else /* _NO_PROTO */
#define __(args)	args
#endif /* _NO_PROTO */

#if defined(__LANGUAGE_PASCAL__)
#undef _AES_SOURCE
#undef _XOPEN_SOURCE
#undef _POSIX_SOURCE
#undef _ANSI_C_SOURCE
#endif /* __LANGUAGE_PASCAL__ */

#endif /* _STANDARDS_H_ */
