~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy-updates

« back to all changes in this revision

Viewing changes to src/modules/perl/modperl_error.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2004-08-19 06:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040819062348-jxl4koqbtvgm8v2t
Tags: 1.99.14-4
Remove the LFS CFLAGS, and build-dep against apache2-*-dev (>= 2.0.50-10)
as we're backing out of the apache2/apr ABI transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2001-2004 The Apache Software Foundation
 
2
 *
 
3
 * Licensed under the Apache License, Version 2.0 (the "License");
 
4
 * you may not use this file except in compliance with the License.
 
5
 * You may obtain a copy of the License at
 
6
 *
 
7
 *     http://www.apache.org/licenses/LICENSE-2.0
 
8
 *
 
9
 * Unless required by applicable law or agreed to in writing, software
 
10
 * distributed under the License is distributed on an "AS IS" BASIS,
 
11
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
12
 * See the License for the specific language governing permissions and
 
13
 * limitations under the License.
 
14
 */
 
15
 
 
16
#ifndef MODPERL_ERROR_H
 
17
#define MODPERL_ERROR_H
 
18
 
 
19
/* to check whether $@ is set by ModPerl::Util::exit */
 
20
#define MODPERL_RC_EXIT APR_OS_START_USERERR + 0
 
21
 
 
22
 
 
23
/**
 
24
 * return the string representation of the error code 
 
25
 * @param rc   error code
 
26
 * @return     the error string
 
27
 *
 
28
 * The return value must be immediately copied unless used only in a
 
29
 * limited visible scope where it's clear that Perl_form() is not
 
30
 * called again (which could happen indirectly). If unsure, copy.
 
31
 */
 
32
char *modperl_error_strerror(pTHX_ apr_status_t rc);
 
33
        
 
34
void modperl_croak(pTHX_ apr_status_t rc, const char* func);
 
35
 
 
36
#define MP_RUN_CROAK(rc_run, func) STMT_START                \
 
37
    {                                                        \
 
38
        apr_status_t rc = rc_run;                            \
 
39
        if (rc != APR_SUCCESS) {                             \
 
40
            modperl_croak(aTHX_ rc, func);                   \
 
41
        }                                                    \
 
42
    } STMT_END
 
43
 
 
44
#endif /* MODPERL_ERROR_H */