2 /* contrib/mips-msa/linux.c
4 * Copyright (c) 2020 Cosmin Truta
5 * Copyright (c) 2016 Glenn Randers-Pehrson
6 * Written by Mandar Sahastrabuddhe, 2016.
8 * This code is released under the libpng license.
9 * For conditions of distribution and use, see the disclaimer
10 * and license in png.h
12 * SEE contrib/mips-msa/README before reporting bugs
15 * BUG REPORTS: png-mng-implement@sourceforge.net
17 * png_have_msa implemented for Linux by reading the widely available
18 * pseudo-file /proc/cpuinfo.
20 * This code is strict ANSI-C and is probably moderately portable; it does
21 * however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
29 png_have_msa(png_structp png_ptr)
31 FILE *f = fopen("/proc/cpuinfo", "rb");
49 int val = strcmp(string, word);
62 #ifdef PNG_WARNINGS_SUPPORTED
64 png_warning(png_ptr, "/proc/cpuinfo open failed");