print_version.c revision 302408
1199481Srdivacky/* 2195340Sed * Copyright (c) 1998 - 2006 Kungliga Tekniska H��gskolan 3195340Sed * (Royal Institute of Technology, Stockholm, Sweden). 4195340Sed * All rights reserved. 5195340Sed * 6195340Sed * Redistribution and use in source and binary forms, with or without 7195340Sed * modification, are permitted provided that the following conditions 8195340Sed * are met: 9195340Sed * 10195340Sed * 1. Redistributions of source code must retain the above copyright 11195340Sed * notice, this list of conditions and the following disclaimer. 12195340Sed * 13195340Sed * 2. Redistributions in binary form must reproduce the above copyright 14195340Sed * notice, this list of conditions and the following disclaimer in the 15195340Sed * documentation and/or other materials provided with the distribution. 16195340Sed * 17195340Sed * 3. Neither the name of the Institute nor the names of its contributors 18195340Sed * may be used to endorse or promote products derived from this software 19195340Sed * without specific prior written permission. 20195340Sed * 21195340Sed * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22195340Sed * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23195340Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24195340Sed * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 25195340Sed * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26195340Sed * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27195340Sed * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28195340Sed * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29195340Sed * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30198090Srdivacky * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31198090Srdivacky * SUCH DAMAGE. 32198090Srdivacky */ 33198090Srdivacky 34195340Sed 35195340Sed#include <config.h> 36195340Sed 37195340Sed#define VERSION_HIDDEN static 38195340Sed 39195340Sed#include "roken.h" 40210299Sed 41210299Sed#include "version.h" 42210299Sed 43210299Sedvoid ROKEN_LIB_FUNCTION 44195340Sedprint_version(const char *progname) 45218893Sdim{ 46218893Sdim const char *package_list = heimdal_version; 47208599Srdivacky 48208599Srdivacky if(progname == NULL) 49195340Sed progname = getprogname(); 50195340Sed 51218893Sdim if(*package_list == '\0') 52218893Sdim package_list = "no version information"; 53208599Srdivacky fprintf(stderr, "%s (%s)\n", progname, package_list); 54208599Srdivacky fprintf(stderr, "Copyright 1995-2011 Kungliga Tekniska H��gskolan\n"); 55195340Sed#ifdef PACKAGE_BUGREPORT 56195340Sed fprintf(stderr, "Send bug-reports to %s\n", PACKAGE_BUGREPORT); 57195340Sed#endif 58195340Sed} 59195340Sed