limit fstBC to 30bp in Python3 ver.
[GalaxyCodeBases.git] / c_cpp / etc / calc / have_uid_t.c
blob431b983bc0819aacec2cbd16728d18ec979a34b9
1 /*
2 * have_uid_t - Determine if we want or can support uid_t
4 * Copyright (C) 1999 Landon Curt Noll
6 * Calc is open software; you can redistribute it and/or modify it under
7 * the terms of the version 2.1 of the GNU Lesser General Public License
8 * as published by the Free Software Foundation.
10 * Calc is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 * Public License for more details.
15 * A copy of version 2.1 of the GNU Lesser General Public License is
16 * distributed with calc under the filename COPYING-LGPL. You should have
17 * received a copy with calc; if not, write to Free Software Foundation, Inc.
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * @(#) $Revision: 30.1 $
21 * @(#) $Id: have_uid_t.c,v 30.1 2007/03/16 11:09:46 chongo Exp $
22 * @(#) $Source: /usr/local/src/bin/calc/RCS/have_uid_t.c,v $
24 * Under source code control: 1995/05/02 03:03:24
25 * File existed as early as: 1995
27 * chongo <was here> /\oo/\ http://www.isthe.com/chongo/
28 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
32 * usage:
33 * have_uid_t
35 * Not all compilers support uid_t, so this may not compile on your system.
37 * This prog outputs several defines:
39 * HAVE_UID_T
40 * defined ==> ok to use uid_t
41 * undefined ==> do not use uid_t
45 #include <stdio.h>
47 #if !defined(HAVE_NO_UID_T)
48 #include "have_unistd.h"
49 #if defined(HAVE_UNISTD_H)
50 #include <unistd.h>
51 #endif
52 #include <pwd.h>
53 #include <sys/types.h>
54 #endif /* ! HAVE_NO_UID_T */
56 int
57 main(void)
59 #if defined(HAVE_NO_UID_T)
61 printf("#undef HAVE_UID_T /* no */\n");
63 #else /* HAVE_NO_UID_T */
65 uid_t curds;
66 extern uid_t geteuid();
68 curds = geteuid();
70 printf("#define HAVE_UID_T /* yes */\n");
72 #endif /* HAVE_NO_UID_T */
74 /* exit(0); */
75 return 0;