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 583 by douglas, 2005-11-21T12:56:05-08:00 vs.
Revision 807 by douglas, 2006-06-29T07:39:29-07:00

# Line 7 | Line 7
7   #ifndef _common_h_
8   #define _common_h_
9  
10 < #ifndef __FreeBSD__
10 > #ifdef linux
11 > #undef linux
12 > #endif
13 >
14 > #if !defined(__FreeBSD__) && !defined(__sun__) && !defined(__APPLE__)
15 > #ifndef _BSD_SOURCE
16   #define _BSD_SOURCE
17 + #endif
18 + #ifndef _POSIX_SOURCE
19   #define _POSIX_SOURCE
20 + #endif
21 + #ifndef _GNU_SOURCE
22   #define _GNU_SOURCE
23   #endif
24 + #elif defined(__sun__)
25 + #define __EXTENSIONS__
26 + #endif
27  
28   #include <pwd.h>
29   #include <regex.h>
# Line 52 | Line 64 | void putpassword(char password[_PASSWORD
64   void get(const char *prompt, regex_t *regex, char **string, jmp_buf environment);
65   void setshells(Shells *shells, jmp_buf environment);
66  
67 < #ifndef __FreeBSD__
67 > #if !defined(__FreeBSD__) && !defined(__sun__) && !defined(__APPLE__)
68   size_t strlcpy(char *dst, const char *src, size_t size);
69   size_t strlcat(char *dst, const char *src, size_t size);
70   char *fgetln(FILE * restrict stream, size_t * restrict len);
71 + #elif defined(__sun__)
72 + char *fgetln(FILE * restrict stream, size_t * restrict len);
73 + int setenv(const char *name, const char *value, int overwrite);
74   #endif
75  
76   #endif//_common_h_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines