libguile/Makefile.am (snarfcppopts): Remove CFLAGS
[bpt/guile.git] / libguile / version.c
index 9f5eedc..f1bd3c3 100644 (file)
@@ -1,22 +1,26 @@
-/*     Copyright (C) 1995,1996, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+/*     Copyright (C) 1995,1996, 1999, 2000, 2001, 2006, 2008, 2010 Free Software Foundation, Inc.
  * 
  * 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.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 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
+ * 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
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
  */
 
 
 \f
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 #include <stdio.h>
 #include "libguile/_scm.h"
@@ -83,19 +87,7 @@ SCM_DEFINE (scm_version, "version", 0, 0, 0,
            "@end lisp")
 #define FUNC_NAME s_scm_version
 {
-
-  char version_str[3 * 4 + 3];
-
-#if SCM_MAJOR_VERSION > 9999 \
-    || SCM_MINOR_VERSION > 9999 \
-    || SCM_MICRO_VERSION > 9999
-# error version string may overflow buffer
-#endif
-  sprintf (version_str, "%d.%d.%d",
-           SCM_MAJOR_VERSION,
-           SCM_MINOR_VERSION,
-           SCM_MICRO_VERSION);
-  return scm_from_locale_string (version_str);
+  return scm_from_locale_string (PACKAGE_VERSION);
 }
 #undef FUNC_NAME
 
@@ -113,14 +105,7 @@ SCM_DEFINE (scm_effective_version, "effective-version", 0, 0, 0,
            "@end lisp")
 #define FUNC_NAME s_scm_effective_version
 {
-
-  char version_str[2 * 4 + 3];
-
-#if (SCM_MAJOR_VERSION > 9999 || SCM_MINOR_VERSION > 9999)
-# error version string may overflow buffer
-#endif
-  sprintf (version_str, "%d.%d", SCM_MAJOR_VERSION, SCM_MINOR_VERSION);
-  return scm_from_locale_string (version_str);
+  return scm_from_locale_string (SCM_EFFECTIVE_VERSION);
 }
 #undef FUNC_NAME