/*= -*- c-file-style: "bsd"; indent-tabs-mode: nil; -*-
 *
 * n4: A fast userspace NFSv4 server.
 * $Id: version.c,v 1.5 2001/08/10 05:05:12 mbp Exp $
 * 
 * Copyright (C) 2001 by Martin Pool <mbp@samba.org>
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

/* Especially trimmed headers, since we recompile this all the time. */

#include "config.h"

#include <stdio.h>
#include <time.h>
#include <sys/time.h>

#include "common/log.h"


#define VERSION_MSG                                                              \
        "%s (%s %s, %s)\n"                                                       \
        "    build: %s on %s\n"                                                  \
        "Copyright (C) 2001 by Martin Pool <mbp@samba.org>\n"                    \
        "n4 is free software, covered by the GNU General Public License, and \n" \
        "you are welcome to change it and/or distribute copies of it under\n"    \
        "certain conditions.\n"

int n4_show_version(char const *program)
{
    printf (VERSION_MSG,
            program,
            PACKAGE, VERSION, BUILD_HOST_TYPE, BUILD_DATE, BUILD_NODE);
    
    return 0;
}


int n4_log_version (int log_opts,
                    char const *program)
{
    n4log (log_opts,
           VERSION_MSG,
           program,
           PACKAGE, VERSION, BUILD_HOST_TYPE, BUILD_DATE, BUILD_NODE);
    
    return 0;
}
