os.c revision b99dbaab171d91e1b664397cc40e039d0c087c65
2058N/A/* ==================================================================== 2058N/A * The Apache Software License, Version 1.1 2058N/A * Copyright (c) 2000-2001 The Apache Software Foundation. All rights 2058N/A * Redistribution and use in source and binary forms, with or without 2058N/A * modification, are permitted provided that the following conditions 2058N/A * 1. Redistributions of source code must retain the above copyright 2058N/A * notice, this list of conditions and the following disclaimer. 2058N/A * 2. Redistributions in binary form must reproduce the above copyright 2058N/A * notice, this list of conditions and the following disclaimer in 2058N/A * the documentation and/or other materials provided with the 2058N/A * 3. The end-user documentation included with the redistribution, 2058N/A * if any, must include the following acknowledgment: 2058N/A * "This product includes software developed by the 2058N/A * Alternately, this acknowledgment may appear in the software itself, 2058N/A * if and wherever such third-party acknowledgments normally appear. 2058N/A * 4. The names "Apache" and "Apache Software Foundation" must 2058N/A * not be used to endorse or promote products derived from this 2058N/A * software without prior written permission. For written 2058N/A * permission, please contact apache@apache.org. 2058N/A * 5. Products derived from this software may not be called "Apache", 2058N/A * nor may "Apache" appear in their name, without prior written 2058N/A * permission of the Apache Software Foundation. 2058N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2058N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 2058N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 2058N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 2058N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2058N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2058N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2058N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2058N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2058N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2058N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2058N/A * ==================================================================== 2058N/A * This software consists of voluntary contributions made by many 2058N/A * individuals on behalf of the Apache Software Foundation. For more 2058N/A * information on the Apache Software Foundation, please see * Portions of this software are based upon public domain software * originally written at the National Center for Supercomputing Applications, * University of Illinois, Urbana-Champaign. * This file will include OS specific functions which are not inlineable. * Any inlineable functions should be defined in os-inline.c instead. /* Check the Content-Type to decide if conversion is needed */ /* To make serving of "raw ASCII text" files easy (they serve faster * since they don't have to be converted from EBCDIC), a new * "magic" type prefix was invented: text/x-ascii-{plain,html,...} * If we detect one of these content types here, we simply correct * the type to the real text/{plain,html,...} type. Otherwise, we * set a flag that translation is required later on. /* If no content type is set then treat it as (ebcdic) text/plain */ /* Conversion is applied to text/ files only, if ever. */ /* translate EBCDIC to ASCII */ /* Enable conversion if it's a text document */ const char *
const *
args,