use version from swi
This commit is contained in:
parent
0e89a9c2ff
commit
b9f1885f0a
@ -43,6 +43,9 @@
|
||||
#include "Yap.h"
|
||||
#include "YapHeap.h"
|
||||
|
||||
#define PLVERSION YAP_VERSION
|
||||
#define PLNAME "yap"
|
||||
|
||||
/* try not to pollute the SWI space */
|
||||
#ifdef P
|
||||
#undef P
|
||||
@ -893,6 +896,10 @@ COMMON(char) digitName(int n, int sm);
|
||||
/**** stuff from pl-utf8.c ****/
|
||||
size_t utf8_strlen(const char *s, size_t len);
|
||||
|
||||
/**** stuff from pl-version.c ****/
|
||||
COMMON(void) setGITVersion(void);
|
||||
|
||||
|
||||
/**** stuff from pl-write.c ****/
|
||||
COMMON(char *) varName(term_t var, char *buf);
|
||||
COMMON(int) writeUCSAtom(IOSTREAM *fd, atom_t atom, int flags);
|
||||
|
@ -95,6 +95,8 @@ COMMON(bool) ChDir(const char *path);
|
||||
COMMON(int) DeleteTemporaryFile(atom_t name);
|
||||
COMMON(int) IsAbsolutePath(const char *spec);
|
||||
|
||||
COMMON(bool) sysError(const char *fm, ...);
|
||||
|
||||
/* TBD */
|
||||
|
||||
extern word globalString(size_t size, char *s);
|
||||
|
@ -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
36
os/pl-version.c
Normal 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
|
||||
}
|
Reference in New Issue
Block a user