use version from swi

This commit is contained in:
Vítor Santos Costa
2013-01-21 09:36:50 +00:00
parent 0e89a9c2ff
commit b9f1885f0a
4 changed files with 46 additions and 6 deletions

View File

@@ -75,9 +75,7 @@ too much.
static void setArgvPrologFlag(void);
#endif
static void setTZPrologFlag(void);
#ifndef __YAP_PROLOG__
static void setVersionPrologFlag(void);
#endif
static atom_t lookupAtomFlag(atom_t key);
static void initPrologFlagTable(void);
@@ -1204,8 +1202,8 @@ initPrologFlags(void)
setTZPrologFlag();
#ifndef __YAP_PROLOG__
setOSPrologFlags();
setVersionPrologFlag();
#endif /* YAP_PROLOG */
setVersionPrologFlag();
}
@@ -1241,8 +1239,6 @@ setTZPrologFlag(void)
setPrologFlag("timezone", FT_INTEGER|FF_READONLY, timezone);
}
#ifndef __YAP_PROLOG__
static void
setVersionPrologFlag(void)
{ GET_LD
@@ -1265,7 +1261,6 @@ setVersionPrologFlag(void)
setGITVersion();
}
#endif /* YAP_PROLOG */
void
cleanupPrologFlags(void)

36
os/pl-version.c Normal file
View File

@@ -0,0 +1,36 @@
/* $Id$
Part of SWI-Prolog
Author: Jan Wielemaker
E-mail: wielemak@science.uva.nl
WWW: http://www.swi-prolog.org
Copyright (C): 1985-2007, University of Amsterdam
This library 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 library 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 library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "pl-incl.h"
#ifdef USE_GIT_VERSION_H
#include <version.h>
#endif
void
setGITVersion(void)
{
#ifdef GIT_VERSION
PL_set_prolog_flag("version_git", PL_ATOM|FF_READONLY, GIT_VERSION);
#endif
}