Return-Path: Delivered-To: apache-bugdb-archive@hyperreal.org Received: (qmail 28395 invoked by uid 6000); 2 Sep 1999 12:20:08 -0000 Received: (qmail 28241 invoked by uid 2001); 2 Sep 1999 12:20:01 -0000 Date: 2 Sep 1999 12:20:01 -0000 Message-ID: <19990902122001.28238.qmail@hyperreal.org> To: apache-bugdb@apache.org Cc: apache-bugdb@apache.org, From: "Jan Gallo" Subject: Re: os-ultrix/4940: configure script fails, building of Apache fails during linking httpd daemon Reply-To: "Jan Gallo" Sender: apache-bugdb-owner@apache.org Precedence: bulk The following reply was made to PR os-ultrix/4940; it has been noted by GNATS. From: "Jan Gallo" To: , Cc: Subject: Re: os-ultrix/4940: configure script fails, building of Apache fails during linking httpd daemon Date: Thu, 2 Sep 1999 14:06:19 +0200 I would like to add some comments about standard CC compiler under Ultrix 4.4, Ultrix 4.5 (and probably also under older versions of Ultrix). The problem is due to types 'long long' and 'unsigned long long'. Implementation of C language under Ultrix knows type 'long long' and 'unsigned long long' however arithmetic operations with operands of this type are problematic. For example, this code works --- example1.c --------- #include void main() { printf("size of type \"long long\" is %d\n", sizeof (long long)); } --- end of example1.c ------- The program will generate output: size of type "long long" is 8 Addition "+" and subtraction "-" seem to work correctly. But multiplication "*" and division "/" (and also for example typecast) doesn't work. --- example2.c --------- void main() { long long i, j, k; double f; i = 0; j = 0; k = i+j; k = i * 20; /* compiler will generate call of internal function __ll_mul */ j = i / 10; /* compiler will generate call of internal function __ll_div */ f = (double)k; /* compiler will generate call of internal function __ll_to_d */ } --- end of example2.c ------- This source code will be successfully compiled, but linker will display error message: ld: Undefined: __ll_mul __ll_div __ll_to_d I checked all libraries *.a in directory /usr/lib with utility "nm" and didn't find any library that would contain code for internal functions __ll_mul, __ll_div, __ll_to_d Changing options for compiler didn't solve this problem. So it is apparent that standard CC compiler has not completely implemented all arithmetic operations with type 'long long' and 'unsigned long long'. On the other side it may be convenient to use in script ./src/Configure more sophisticated algorithm for determining the value of macro AP_LONGEST_LONG because this problem may occur on other platforms. It follows from mentioned above that there is another solution of compilation problem with Apache 1.3.9 under Ultrix with standard CC compiler. Header file ./src/include/ap_config_auto.h should be modified after configuration phase: /* determine: longest possible integer type */ #ifndef AP_LONGEST_LONG #define AP_LONGEST_LONG long #endif So there is no need to modify source code in function conv_10_quad. By the way function conv_10 need not to be modified because variables magnitude, new_magnitude used in this function are type of u_wide_int (that is unsigned long, which is OK). J. Gallo.