view src/libgcrypt-test.c @ 6396:d5e6775fb3bc release

Add uninstall options to remove local packages and settings (Bug #62352) * src/default-octave.mk, src/release-octave.mk, src/stable-octave.mk: save api version to file * tools/makeinst-script.sh.in: add uninstall options, and on set, remove specified files from appdata/octave (grafted from 8fe292548edfeb8a82e64f0e2b5da1a65e35d835)
author John Donoghue <john.donoghue@ieee.org>
date Wed, 31 Aug 2022 08:09:19 -0400
parents 3a37e58eab36
children
line wrap: on
line source

/*
 * This file is part of MXE.
 * See index.html for further information.
 */

#include <stdio.h>
#include <gcrypt.h>

int main(int argc, char *argv[])
{
    (void)argc;
    (void)argv;

    if (!gcry_check_version (GCRYPT_VERSION)) {
        fputs ("libgcrypt version mismatch\n", stderr);
        exit (2);
    }

    gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
    gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
    gcry_control (GCRYCTL_RESUME_SECMEM_WARN);
    gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);

    if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) {
       fputs ("libgcrypt has not been initialized\n", stderr);
       abort ();
    }

    printf("gcrypt version: %s", GCRYPT_VERSION );

    return 0;
}