1331722Seadler/* 257257Sdufault * Copyright (c) 1996-1999 357257Sdufault * HD Associates, Inc. All rights reserved. 457257Sdufault * 557257Sdufault * Redistribution and use in source and binary forms, with or without 657257Sdufault * modification, are permitted provided that the following conditions 757257Sdufault * are met: 857257Sdufault * 1. Redistributions of source code must retain the above copyright 957257Sdufault * notice, this list of conditions and the following disclaimer. 1057257Sdufault * 2. Redistributions in binary form must reproduce the above copyright 1157257Sdufault * notice, this list of conditions and the following disclaimer in the 1257257Sdufault * documentation and/or other materials provided with the distribution. 1357257Sdufault * 3. All advertising materials mentioning features or use of this software 1457257Sdufault * must display the following acknowledgement: 1557257Sdufault * This product includes software developed by HD Associates, Inc 1657257Sdufault * 4. Neither the name of the author nor the names of any co-contributors 1757257Sdufault * may be used to endorse or promote products derived from this software 1857257Sdufault * without specific prior written permission. 1957257Sdufault * 2057257Sdufault * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND 2157257Sdufault * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2257257Sdufault * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2357257Sdufault * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE 2457257Sdufault * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2557257Sdufault * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2657257Sdufault * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2757257Sdufault * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2857257Sdufault * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2957257Sdufault * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3057257Sdufault * SUCH DAMAGE. 3157257Sdufault * 3257257Sdufault * $FreeBSD$ 3357257Sdufault */ 3457257Sdufault#define _POSIX_SOURCE 3557257Sdufault#define _POSIX_C_SOURCE 199309L 3657257Sdufault#include <unistd.h> 3757257Sdufault#include <stdio.h> 3857257Sdufault 3957257Sdufaultint p26(int ac, char *av[]) 4057257Sdufault{ 4157257Sdufault int ret = 0; 4257257Sdufault 4357257Sdufault #ifndef _POSIX_VERSION 4457257Sdufault printf("POSIX is not supported.\n"); 4557257Sdufault ret = -1; 4657257Sdufault #else /* _POSIX_VERSION */ 4757257Sdufault 4857257Sdufault #if (_POSIX_VERSION == 198808L) 4957257Sdufault printf("POSIX.1 is supported but not POSIX.1B (FIPS 151-1)\n"); 5057257Sdufault #elif (_POSIX_VERSION == 199009L) 5157257Sdufault printf("POSIX.1 is supported but not POSIX.1B (FIPS 151-2)\n"); 5257257Sdufault #elif (_POSIX_VERSION >= 199309L) 5357257Sdufault printf("POSIX.1 and POSIX.1B are supported.\n"); 5457257Sdufault #else 5557257Sdufault printf("_POSIX_VERSION (%ld) not 198808, 199009, or >= 199309.\n", 5657257Sdufault _POSIX_VERSION); 5757257Sdufault ret = -1; 5857257Sdufault #endif 5957257Sdufault 6057257Sdufault #endif /* _POSIX_VERSION */ 6157257Sdufault return ret; 6257257Sdufault} 6357257Sdufault#ifdef STANDALONE_TESTS 6457257Sdufaultint main(int argc, char *argv[]) { return p26(argc, argv); } 6557257Sdufault#endif 66