summaryrefslogblamecommitdiffstats
path: root/testutil/is-section-half.c
blob: 60de62aa60499e98df799a11a9ec3e5278c3e1cc (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                                                         
                  

                   



                                                                                         

   
                           
 








                                                                                    
 
/* See LICENSE file for copyright and license details. */
#include "../libsyscalls.h"

#include <stdio.h>
#include <stdlib.h>

#if defined(__clang__)
# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* clang is just being silly */
#endif


int
main(int argc, char **argv)
{
	int sec;

	if (argc != 2) {
		fprintf(stderr, "usage error\n");
		return 3;
	}

	sec = atoi(argv[1]);
	return !LIBSYSCALLS_IS_SECTION_HALF((enum libsyscalls_datatype_section)sec);
}