DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39059>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39059 Summary: patch to compile apr-1.2.2 on SkyOS Product: APR Version: 1.2.2 Platform: Other URL: http://www.skyos.org OS/Version: other Status: NEW Severity: enhancement Priority: P2 Component: APR AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] These are patches to be able to compile apr on SkyOS. The modifications are done with #ifdef SKYOS to prevent breaking the other platforms. Needed modification: * mkfifo is not available in SkyOS so I needed to work around this. * switched the order of 2 includes to solve undefined struct iovec * removed a function definition, although this should not generate errors in normal conditions. However there might be a compiler issue, so this is the current solution. pipe.c.patch: file_io/unix/pipe.c =================== cut here ============== Index: file_io/unix/pipe.c =================================================================== --- file_io/unix/pipe.c (revision 79) +++ file_io/unix/pipe.c (working copy) @@ -45,7 +45,7 @@ fd_flags &= ~O_NDELAY; # elif defined(O_FNDELAY) fd_flags &= ~O_FNDELAY; -# else +# else /* XXXX: this breaks things, but an alternative isn't obvious...*/ return APR_ENOTIMPL; # endif @@ -61,8 +61,8 @@ } # else /* "classic" BeOS doesn't support this at all */ return APR_ENOTIMPL; -# endif - +# endif + #endif /* !BEOS_BLOCKING */ thepipe->blocking = BLK_ON; @@ -87,7 +87,7 @@ if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) { return errno; } - + #else /* BEOS_BLOCKING */ # if BEOS_BONE /* This only works on BONE 0-6 */ @@ -139,7 +139,7 @@ apr_pool_t *pool) { int *dafile = thefile; - + (*file) = apr_pcalloc(pool, sizeof(apr_file_t)); (*file)->pool = pool; (*file)->eof_hit = 0; @@ -183,7 +183,7 @@ if (pipe(filedes) == -1) { return errno; } - + (*in) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t)); (*in)->pool = pool; (*in)->filedes = filedes[0]; @@ -222,7 +222,15 @@ return APR_SUCCESS; } -APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, +#ifdef SKYOS +/* patch for SkyOS to fix unsupported mkfifo, added by Peter Speybrouck, 3/3/2006 */ +int mkfifo(const char *filename,int mode){ + printd("apr: file_io/unix/pipe.c:230: mkfifo not supported/implemented"); + return -1; +} +#endif + +APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *pool) { mode_t mode = apr_unix_perms2mode(perm); @@ -231,7 +239,7 @@ return errno; } return APR_SUCCESS; -} +} - + =================== cut here ============== apr_strings.patch: =================== cut here ============== Index: include/apr_strings.h =================================================================== --- include/apr_strings.h (revision 80) +++ include/apr_strings.h (working copy) @@ -61,7 +61,7 @@ /** * @defgroup apr_strings String routines - * @ingroup APR + * @ingroup APR * @{ */ @@ -76,7 +76,7 @@ APR_DECLARE(int) apr_strnatcmp(char const *a, char const *b); /** - * Do a natural order comparison of two strings ignoring the case of the + * Do a natural order comparison of two strings ignoring the case of the * strings. * @param a The first string to compare * @param b The second string to compare @@ -109,7 +109,7 @@ APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n); /** - * duplicate the first n characters of a string into memory allocated + * duplicate the first n characters of a string into memory allocated * out of a pool; the new string will be null-terminated * @param p The pool to allocate out of * @param s The string to duplicate @@ -144,11 +144,12 @@ * @param nbytes (output) strlen of new string (pass in NULL to omit) * @return The new string */ +#ifndef SKYOS APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes); - +#endif /** - * printf-style style printing routine. The data is output to a string + * printf-style style printing routine. The data is output to a string * allocated from a pool * @param p The pool to allocate out of * @param fmt The format of the string @@ -158,7 +159,7 @@ APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap); /** - * printf-style style printing routine. The data is output to a string + * printf-style style printing routine. The data is output to a string * allocated from a pool * @param p The pool to allocate out of * @param fmt The format of the string @@ -183,10 +184,10 @@ * <PRE> * Note the differences between this function and strncpy(): * 1) strncpy() doesn't always NUL terminate; apr_cpystrn() does. - * 2) strncpy() pads the destination string with NULs, which is often + * 2) strncpy() pads the destination string with NULs, which is often * unnecessary; apr_cpystrn() does not. * 3) strncpy() returns a pointer to the beginning of the dst string; - * apr_cpystrn() returns a pointer to the NUL terminator of dst, + * apr_cpystrn() returns a pointer to the NUL terminator of dst, * to allow a check for truncation. * </PRE> */ @@ -203,7 +204,7 @@ APR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src); /** - * Convert the arguments to a program from one string to an array of + * Convert the arguments to a program from one string to an array of * strings terminated by a NULL pointer * @param arg_str The arguments to convert * @param argv_out Output location. This is a pointer to an array of strings. @@ -214,7 +215,7 @@ apr_pool_t *token_context); /** - * Split a string into separate null-terminated tokens. The tokens are + * Split a string into separate null-terminated tokens. The tokens are * delimited in the string by one or more characters from the sep * argument. * @param str The string to separate; this should be specified on the @@ -310,7 +311,7 @@ * digits are prefixed with '0x', in which case it will be treated as * base 16. */ -APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *buf, +APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *buf, char **end, int base); /** Index: strings/apr_strings.c =================================================================== --- strings/apr_strings.c (revision 82) +++ strings/apr_strings.c (working copy) @@ -47,9 +47,14 @@ */ #include "apr.h" +#ifdef SKYOS +#include "apr_private.h" #include "apr_strings.h" +#else +#include "apr_strings.h" +#include "apr_private.h" +#endif #include "apr_general.h" -#include "apr_private.h" #include "apr_lib.h" #define APR_WANT_STDIO #define APR_WANT_STRFUNC @@ -161,7 +166,7 @@ else { len = strlen(argp); } - + memcpy(cp, argp, len); cp += len; } @@ -197,7 +202,7 @@ /* Allocate the required string */ res = (char *) apr_palloc(a, len + 1); - + /* Pass two --- copy the argument strings into the result space */ src = vec; dst = res; @@ -292,7 +297,7 @@ * in both the mult and add/sub operation. Unlike the bsd impl, * we also work strictly in a signed int64 word as we haven't * implemented the unsigned type in win32. - * + * * Set 'any' if any `digits' consumed; make it negative to indicate * overflow. */ @@ -319,7 +324,7 @@ else if (c >= 's' && c <= 'z') c -= 'z' - 28; #else -#error "CANNOT COMPILE apr_strtoi64(), only ASCII and EBCDIC supported" +#error "CANNOT COMPILE apr_strtoi64(), only ASCII and EBCDIC supported" #endif else break; =================== cut here ============== -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
