]> sigrok.org Git - libsigrokdecode.git/blobdiff - version.c
jtag_ejtag: Fix short/long annotation order.
[libsigrokdecode.git] / version.c
index 9449c2d6b30d6531f504ca99bac62440635b3232..9ff10800f00baa3111111c639c5ff91152ae8f2e 100644 (file)
--- a/version.c
+++ b/version.c
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "sigrokdecode.h"
+#include <config.h>
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
 
 /**
  * @file
@@ -145,4 +146,34 @@ SRD_API const char *srd_lib_version_string_get(void)
        return SRD_LIB_VERSION_STRING;
 }
 
+SRD_API GSList *srd_buildinfo_libs_get(void)
+{
+       GSList *l = NULL, *m = NULL;
+
+       m = g_slist_append(NULL, g_strdup("glib"));
+       m = g_slist_append(m, g_strdup_printf("%d.%d.%d (rt: %d.%d.%d/%d:%d)",
+               GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION,
+               glib_major_version, glib_minor_version, glib_micro_version,
+               glib_binary_age, glib_interface_age));
+       l = g_slist_append(l, m);
+
+       m = g_slist_append(NULL, g_strdup("Python"));
+       m = g_slist_append(m, g_strdup_printf("%s / 0x%x (API %s, ABI %s)",
+               PY_VERSION, PY_VERSION_HEX, PYTHON_API_STRING, PYTHON_ABI_STRING));
+       l = g_slist_append(l, m);
+
+       return l;
+}
+
+SRD_API char *srd_buildinfo_host_get(void)
+{
+       return g_strdup_printf("%s, %s-endian", CONF_HOST,
+#ifdef WORDS_BIGENDIAN
+       "big"
+#else
+       "little"
+#endif
+       );
+}
+
 /** @} */