ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/CCSAdmin/common.h
(Generate patch)

Comparing CCSAdmin/common.h (file contents):
Revision 571 by douglas, 2005-08-28T01:55:06-07:00 vs.
Revision 572 by douglas, 2005-09-25T17:43:17-07:00

# Line 7 | Line 7
7   #ifndef _common_h_
8   #define _common_h_
9  
10 + #ifndef __FreeBSD__
11 + #define _BSD_SOURCE
12 + #define _POSIX_SOURCE
13 + #define _GNU_SOURCE
14 + #endif
15 +
16   #include <pwd.h>
17   #include <regex.h>
18   #include <setjmp.h>
# Line 18 | Line 24
24   #include <sys/wait.h>
25   #include <unistd.h>
26  
27 + #ifndef _PASSWORD_LEN
28 + #define _PASSWORD_LEN BUFSIZ
29 + #endif
30 +
31 + #ifndef MAXLOGNAME
32 + #define MAXLOGNAME 17
33 + #endif
34 +
35   int check(int value, jmp_buf environment);
36   int regcheck(int value, const regex_t *regex, jmp_buf environment);
37   char *fcheck(char *value, FILE *stream, jmp_buf environment);
# Line 26 | Line 40 | void getpassword(char password[_PASSWORD
40   void putpassword(char password[_PASSWORD_LEN], char *name, jmp_buf environment);
41   void get(const char *prompt, regex_t *regex, char **string, jmp_buf environment);
42  
43 + #ifndef __FreeBSD__
44 + size_t strlcpy(char *dst, const char *src, size_t size);
45 + size_t strlcat(char *dst, const char *src, size_t size);
46 + char *fgetln(FILE * restrict stream, size_t * restrict len);
47 + #endif
48 +
49   #endif//_common_h_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines