[svn-inject] Applying Debian modifications to trunk
[manu/suphp.git] / src / error.h
1 /*
2     suPHP - (c)2002 Sebastian Marsching <sebastian@marsching.com>
3     
4     This file is part of suPHP.
5
6     suPHP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     suPHP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with suPHP; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19 */
20
21 #ifndef SUPHP_ERROR_H
22 #define SUPHP_ERROR_H
23
24 // Errorcode, only used internally
25 #define ERRCODE_WRONG_ENVIRONMENT 1
26 #define ERRCODE_WRONG_PATH 2
27 #define ERRCODE_LOW_UID 3
28 #define ERRCODE_LOW_GID 6
29 #define ERRCODE_FILE_NOT_FOUND 4
30 #define ERRCODE_WRONG_PARENT 5
31 #define ERRCODE_WRONG_PERMISSIONS 7
32 #define ERRCODE_SYMBOLLINK_NO_MATCH 9
33 #define ERRCODE_NO_LOG 8
34 #define ERRCODE_UNKNOWN 9999
35 #define ERRCODE_MEMORY 10
36 #define ERRCODE_WRONG_UID 11
37 #define ERRCODE_WRONG_GID 12
38
39 // Functions in error.c
40 void error_exit(int errcode);
41 void error_msg_exit(int errcode, char *msg, char *file, int line);
42 void error_sysmsg_exit(int errcode, char *msg, char *file, int line);
43
44 #endif
45