harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r810084 [2/3] - in /harmony/enhanced/classlib/trunk: depends/build/ modules/luni/src/main/native/launcher/shared/ modules/luni/src/main/native/launcher/unix/ modules/luni/src/main/native/luni/shared/ modules/portlib/ modules/portlib/src/mai...
Date Tue, 01 Sep 2009 15:06:18 GMT
Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/atoe_utils.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/atoe_utils.c?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/atoe_utils.c (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/atoe_utils.c Tue Sep  1 15:06:16 2009
@@ -0,0 +1,578 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+
+/*
+ * DESCRIPTION:
+ * A set of util functions which need to be part of the a2e DLL but
+ * can't be in atoe.c due to problems with redefinition
+ * ===========================================================================
+ */
+
+#include <ctype.h>
+
+/*
+ * ======================================================================
+ * Disable the redefinition of the system IO functions, this
+ * prevents ATOE functions calling themselves.
+ * ======================================================================
+ */
+#undef HY_ATOE
+
+/*
+ * ======================================================================
+ * Include all system header files.
+ * ======================================================================
+ */
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>   /* for malloc() via e2a_string()/a2e_string() */
+/*
+ * ======================================================================
+ * Define ae2,e2a,a2e_string, e2a_string
+ * ======================================================================
+ */
+#include <atoe.h>
+
+#define ERROR_RETVAL -1
+#define SUCCESS 0
+#define CheckRet(x) { if ((x) == ERROR_RETVAL) return ERROR_RETVAL; }
+
+typedef struct InstanceData {
+    char *buffer;
+    char *end;
+} InstanceData;
+
+/**************************************************************************
+ * name        - pchar
+ * description - Print a charater to InstanceData buffer
+ * parameters  - this   Structure holding the receiving buffer
+ *               c      Character to add to buffer
+ * returns     - int return code, 0 for success
+ *************************************************************************/
+static int
+pchar(InstanceData *this, int c) {
+    if (this->buffer >= this->end) {
+        return ERROR_RETVAL;
+    }
+    *this->buffer++ = c;
+    return SUCCESS;
+}
+
+/**************************************************************************
+ * name        - fstring
+ * description - Print a string to InstanceData buffer
+ * parameters  - this           Structure holding the receiving buffer
+ *               str            String to add to buffer
+ *               left_justify   Left justify string flag
+ *               min_width      Minimum width of string added to buffer
+ *               precision
+ * returns     - int return code, 0 for success
+ *************************************************************************/
+static int
+fstring(InstanceData *this, char *str, int left_justify, int min_width,
+        int precision) {
+    int pad_length;
+    char *p;
+
+    if (str == 0) {
+        return ERROR_RETVAL;
+    }
+
+    if ((int)strlen(str) < precision) {
+        pad_length = min_width - strlen(str);
+    } else {
+        pad_length = min_width - precision;
+    }
+    if (pad_length < 0)
+        pad_length = 0;
+    if (left_justify) {
+        while (pad_length > 0) {
+            CheckRet(pchar(this, ' '));
+            --pad_length;
+        }
+    }
+
+    for (p = str; *p != '\0' && --precision >= 0; p++) {
+        CheckRet(pchar(this, *p));
+    }
+
+    if (!left_justify) {
+        while (pad_length > 0) {
+            CheckRet(pchar(this, ' '));
+            --pad_length;
+        }
+    }
+    return SUCCESS;
+}
+
+#define MAX_DIGITS 32
+typedef enum {
+    FALSE = 0,
+    TRUE = 1
+} bool_t;
+
+/**************************************************************************
+ * name        - fnumber
+ * description - Print an integer to InstanceData buffer
+ * parameters  - this           Structure containing receiving buffer
+ *               value          The value to format
+ *               format_type    Character flag specifying format type
+ *               left_justify   Left justify number flag
+ *               min_width      Minimum number of charaters value will
+ *                              occupy
+ *               precision
+ *               zero_pad       Pad number with zeros, flag
+ * returns     - int return code, 0 for success
+ *************************************************************************/
+static int
+fnumber(InstanceData *this, long value, int format_type, int left_justify,
+        int min_width, int precision, bool_t zero_pad) {
+    int sign_value = 0;
+    unsigned long uvalue;
+    char convert[MAX_DIGITS+1];
+    int place = 0;
+    int pad_length = 0;
+    static char digits[] = "0123456789abcdef";
+    int base = 0;
+    bool_t caps = FALSE;
+    bool_t add_sign = FALSE;
+
+    switch (format_type) {
+    case 'o':
+    case 'O':
+        base = 8;
+        break;
+    case 'd':
+    case 'D':
+    case 'i':                                                 
+    case 'I':                                                 
+        add_sign = TRUE; /*FALLTHROUGH*/
+    case 'u':
+    case 'U':
+        base = 10;
+        break;
+    case 'X':
+        caps = TRUE; /*FALLTHROUGH*/
+    case 'x':
+        base = 16;
+        break;
+    case 'p':
+        caps = TRUE;  /*FALLTHROUGH*/
+        base = 16;
+        break;
+    }
+
+    uvalue = value;
+    if (add_sign) {
+        if (value < 0) {
+            sign_value = '-';
+            uvalue = -value;
+        }
+    }
+
+    do {
+        convert[place] = digits[uvalue % (unsigned)base];
+        if (caps) {
+            convert[place] = toupper(convert[place]);
+        }
+        place++;
+        uvalue = (uvalue / (unsigned)base);
+        if (place > MAX_DIGITS) {
+            return ERROR_RETVAL;
+        }
+    } while (uvalue);
+    convert[place] = 0;
+
+    pad_length = min_width - place;
+    if (pad_length < 0) {
+        pad_length = 0;
+    }
+    if (left_justify) {
+        if (zero_pad && pad_length > 0) {
+            if (sign_value) {
+                CheckRet(pchar(this, sign_value));
+                --pad_length;
+                sign_value = 0;
+            }
+            while (pad_length > 0) {
+                CheckRet(pchar(this, '0'));
+                --pad_length;
+            }
+        } else {
+            while (pad_length > 0) {
+                CheckRet(pchar(this, ' '));
+                --pad_length;
+            }
+        }
+    }
+    if (sign_value) {
+        CheckRet(pchar(this, sign_value));
+    }
+
+    while (place > 0 && --precision >= 0) {
+        CheckRet(pchar(this, convert[--place]));
+    }
+
+    if (!left_justify) {
+        while (pad_length > 0) {
+            CheckRet(pchar(this, ' '));
+            --pad_length;
+        }
+    }
+    return SUCCESS;
+}
+
+/*
+ *=======================================================================
+ * name        - flongnumber 
+ * description - Print an 64bit integer to InstanceData buffer.
+ * parameters  - this          Structure holding receiving buffer
+ *               value         Number to convert
+ *               format_type   Character flag defining format
+ *               left_justify  Left justify number flag
+ *               min_width     Minimum number of charaters value will
+ *                             occupy
+ *               precision
+ *               zero_pad      Pad number with zeros, flag
+ * returns     - int return code,  0 for success
+ *=======================================================================
+ */
+static int
+flongnumber(InstanceData *this, signed long long value, int format_type, int left_justify,
+        int min_width, int precision, bool_t zero_pad) {
+    int sign_value = 0;
+    unsigned long long uvalue;
+    char convert[MAX_DIGITS+1];
+    int place = 0;
+    int pad_length = 0;
+    static char digits[] = "0123456789abcdef";
+    int base = 0;
+    bool_t caps = FALSE;
+    bool_t add_sign = FALSE;
+
+    switch (format_type) {
+    case 'o':
+    case 'O':
+        base = 8;
+        break;
+    case 'd':
+    case 'D':
+    case 'i':                                                
+    case 'I':                                                
+        add_sign = TRUE; /*FALLTHROUGH*/
+    case 'u':
+    case 'U':
+        base = 10;
+        break;
+    case 'X':
+        caps = TRUE; /*FALLTHROUGH*/
+    case 'x':
+        base = 16;
+        break;
+    case 'p':
+        caps = TRUE;  /*FALLTHROUGH*/
+        base = 16;
+        break;
+    }
+
+    uvalue = value;
+    if (add_sign) {
+        if (value < 0) {
+            sign_value = '-';
+            uvalue = -(value);
+        }
+    }
+
+    do {
+        convert[place] = digits[(uvalue % (unsigned long long)base)];
+        if (caps) {
+            convert[place] = toupper(convert[place]);
+        }
+        place++;
+        uvalue = (uvalue / (unsigned long long)base);
+        if (place > MAX_DIGITS) {
+            return ERROR_RETVAL;
+        }
+    } while (uvalue);
+    convert[place] = 0;
+
+    pad_length = min_width - place;
+    if (pad_length < 0) {
+        pad_length = 0;
+    }
+    if (left_justify) {
+        if (zero_pad && pad_length > 0) {
+            if (sign_value) {
+                CheckRet(pchar(this, sign_value));
+                --pad_length;
+                sign_value = 0;
+            }
+            while (pad_length > 0) {
+                CheckRet(pchar(this, '0'));
+                --pad_length;
+            }
+        } else {
+            while (pad_length > 0) {
+                CheckRet(pchar(this, ' '));
+                --pad_length;
+            }
+        }
+    }
+    if (sign_value) {
+        CheckRet(pchar(this, sign_value));
+    }
+
+    while (place > 0 && --precision >= 0) {
+        CheckRet(pchar(this, convert[--place]));
+    }
+
+    if (!left_justify) {
+        while (pad_length > 0) {
+            CheckRet(pchar(this, ' '));
+            --pad_length;
+        }
+    }
+    return SUCCESS;
+}
+
+/**************************************************************************
+ * name        - atoe_vsnprintf
+ * description - printf variant function taking a receiving buffer and varargs list
+ * parameters  - str    Receiving string buffer
+ *               count  Maximum length of receiving buffer
+ *               fmt    Format specifier string
+ *               argc   Variable length argument list
+ * returns     -
+ *************************************************************************/
+int
+atoe_vsnprintf(char *str, size_t count, const char *fmt, va_list args) {
+    char *strvalue;
+    const char *pattern;                                       
+    long value;
+    InstanceData this;
+    bool_t left_justify, zero_pad;
+    bool_t long_flag, long_long_flag;                         
+    bool_t fPrecision;
+    int min_width, precision, ch;
+    static char NULLCHARSTRING[] = "[null]";                
+                                                            
+    if (fmt == NULL)                                        
+    {                                                       
+      fmt = NULLCHARSTRING;                                 
+    }                                                       
+    if (str == NULL)
+    {
+      return ERROR_RETVAL;
+    }
+    str[0] = '\0';
+
+    this.buffer = str;
+    this.end = str + count - 1;
+    *this.end = '\0';          /* ensure null-termination in case of failure */
+
+    while ((ch = *fmt++) != 0) {
+        if (ch == '%') {
+            zero_pad = FALSE;
+            long_flag = FALSE;
+            long_long_flag = FALSE;                            
+            fPrecision = FALSE;
+            pattern = fmt-1;                                   
+            left_justify = TRUE;
+            min_width = 0;
+            precision = this.end - this.buffer;
+
+            next_char:
+            ch = *fmt++;
+            switch (ch) {
+            case 0:
+                return ERROR_RETVAL;
+            case '-':
+                left_justify = FALSE;
+                goto next_char;
+            case '+':                                          
+                left_justify = TRUE;                           
+                goto next_char;                                
+            case '0':            /* set zero padding if min_width not set */
+                if (min_width == 0)
+                    zero_pad = TRUE;
+                /*FALLTHROUGH*/
+            case '1':
+            case '2':
+            case '3':
+            case '4':
+            case '5':
+            case '6':
+            case '7':
+            case '8':
+            case '9':
+                if (fPrecision == TRUE) {
+                    precision = precision * 10 + (ch - '0');
+                } else {
+                    min_width = min_width * 10 + (ch - '0');
+                }
+                goto next_char;
+            case '.':
+                fPrecision = TRUE;
+                precision = 0;
+                goto next_char;
+            case '*': {
+                int temp_precision = va_arg(args, int);
+                if (fPrecision == TRUE) {
+                    precision = temp_precision;
+                } else {
+                    min_width = temp_precision;
+                }
+                goto next_char;
+		    }
+            case 'l':
+                if (long_flag) {
+                    long_long_flag = TRUE;
+                    long_flag = FALSE;
+                } else {
+                    long_flag = TRUE;
+                }
+                goto next_char;
+            case 's':
+                strvalue = va_arg(args, char *);
+                CheckRet(fstring(&this, strvalue, left_justify,
+                                 min_width, precision));
+                break;
+            case 'c':
+                ch = va_arg(args, int);
+                CheckRet(pchar(&this, ch));
+                break;
+            case '%':
+                CheckRet(pchar(&this, '%'));
+                break;
+            case 'd':
+            case 'D':
+            case 'i':                                                
+            case 'I':                                                
+            case 'u':
+            case 'U':
+            case 'o':
+            case 'O':
+            case 'x':
+            case 'X':
+                if (long_long_flag) {                                      
+                    signed long long value64 = va_arg(args, signed long long);               
+
+                    CheckRet(flongnumber(&this, value64, ch, left_justify,
+                                     min_width, precision, zero_pad));     
+                } else {
+                    value = long_flag ? va_arg(args, long) : va_arg(args, int);
+                    CheckRet(fnumber(&this, value, ch, left_justify,
+                                     min_width, precision, zero_pad));
+                }
+                break;
+            case 'p':
+                value = (long) va_arg(args, char *);
+                CheckRet(fnumber(&this, value, ch, left_justify,
+                                 min_width, precision, zero_pad));
+                break;
+            case 'e':
+            case 'E':
+            case 'f':
+            case 'F':
+            case 'g':
+            case 'G':
+                {
+                    char *b;
+                    int len;
+
+                    b = a2e((char *)pattern, fmt-pattern);
+
+                    /* Extract a double from args, this works for both doubles
+                     * and floats,
+                     * NB if we use float for a single precision floating
+                     * point number the result is wrong.
+                     */
+                    len = sprintf(this.buffer, b, va_arg(args, double));
+                    free(b);
+                    b = e2a_string(this.buffer);
+                    strcpy(this.buffer, b);
+                    free(b);
+                    this.buffer += len;
+
+                }
+                break;
+            default:
+                /* 
+                 * If all we got was "%ll" assume
+                 * there should be a d on the end
+                 */
+                if (long_long_flag) {
+                    signed long long value64 = va_arg(args, signed long long);
+
+                    CheckRet(flongnumber(&this, value64, 'd', left_justify,
+                                         min_width, precision, zero_pad));
+
+                    fmt--; /*backup so we don't lose the current char */
+                    break;
+                }
+
+                return ERROR_RETVAL;
+            }
+        } else {
+            CheckRet(pchar(&this, ch));
+        }
+    }
+    *this.buffer = '\0';
+    return strlen(str);
+}
+
+/**************************************************************************
+ * name        - ConvertArgstoASCII
+ * description - Used by main to convert the command line arguments to ASCII.
+ * parameters  - argc   The number command line arguments in array argv
+ *               argv   A string array holding the command line arguments
+ * returns     -
+ *************************************************************************/
+void
+ConvertArgstoASCII(int argc, char **argv) {
+    int i;
+
+    if (iconv_init() != -1) {
+        for (i=0; i<argc; i++) {
+            argv[i] = e2a_string(argv[i]);
+        }
+    }
+}
+
+/**************************************************************************
+ * name        - ConvertArgsToPlatform
+ * description - Used by main to convert the processed command line
+ *               arguments back to EBCDIC encoding before passing them
+ *               to the Java String constructor.
+ *
+ *               NB : This function involves a small memory leak.
+ * parameters  - argc   The number command line arguments in array argv
+ *               argv   A string array holding the command line arguments
+ * returns     -
+ *************************************************************************/
+void
+ConvertArgsToPlatform(int argc, char **argv) {
+    int i;
+
+    for (i=0; i<argc; i++) {
+        argv[i] = a2e_string(argv[i]);
+    }
+
+}
+
+/* END OF FILE */

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/atoe_utils.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/exports.txt?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/exports.txt (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/exports.txt Tue Sep  1 15:06:16 2009
@@ -0,0 +1 @@
+# Empty file to satisfy build

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/exports.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/arpa/inet.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/arpa/inet.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/arpa/inet.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/arpa/inet.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "inet.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                       
+#include <//'PP.ADLE370.OS39028.SCEEH.ARPA.H(inet)'>   
+#else                                                  
+#include </usr/include/arpa/inet.h>                    
+#endif                                                 
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_INET)
+		#define HY_ATOE_INET
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        unsigned long atoe_inet_addr(char *);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef inet_addr
+
+		#define inet_addr       atoe_inet_addr
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/arpa/inet.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/atoe.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/atoe.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/atoe.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/atoe.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Generic ASCII to EBCDIC character conversion header file. This file defines
+ * the base conversion functions used by the atoe_* functions.
+ * ===========================================================================
+ */
+
+#include <stdlib.h> /* For malloc */
+
+#if !defined(_HY_ATOE_H_)
+    #define _HY_ATOE_H_
+
+    #pragma map(sysTranslateASM, "SYSXLATE")
+    #ifdef __cplusplus         
+        extern char* sysTranslateASM(const char *source, int length, char *trtable, char* xlate_buf);
+        extern char* sysTranslate(const char *source, int length, char *trtable, char* xlate_buf);
+    #else
+        extern char* sysTranslateASM(const char *source, int length, char *trtable, char* xlate_buf);
+        extern char* sysTranslate(const char *source, int length, char *trtable, char* xlate_buf);
+    #endif
+
+    extern int iconv_init(void);
+
+    #if !defined(MAXPATHLEN)
+        #define MAXPATHLEN     1023+1
+    #endif
+
+    #if !defined(CONV_TABLE_SIZE)
+        #define CONV_TABLE_SIZE 256
+        extern char a2e_tab[CONV_TABLE_SIZE];
+        extern char e2a_tab[CONV_TABLE_SIZE];
+    #endif
+
+      #define a2e(str, len) sysTranslate(str, abs(len), a2e_tab, (char *)malloc(abs(len)+1))
+      #define e2a(str, len) sysTranslate(str, abs(len), e2a_tab, (char *)malloc(abs(len)+1))
+
+      #define a2e_string(str) sysTranslate(str, strlen(str), a2e_tab, (char *)malloc(strlen(str)+1)) 
+      #define e2a_string(str) sysTranslate(str, strlen(str), e2a_tab, (char *)malloc(strlen(str)+1)) 
+
+    char *a2e_func(char *str, int len);    
+    char *e2a_func(char *str, int len);    
+
+    void atoe_enableFileTagging(void);
+    void atoe_setFileTaggingCcsid(void *pccsid);
+
+#endif  /* _HY_ATOE_H_ */
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/atoe.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/ctype.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/ctype.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/ctype.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/ctype.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,92 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/* 
+ * DESCRIPTION:
+ * Replace the system header file "ctype.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000              
+#include <//'PP.ADLE370.OS39028.SCEEH.H(ctype)'>
+#else                                           
+#include </usr/include/ctype.h>                 
+#endif                                          
+
+#if defined(HY_ATOE)
+
+        #if !defined(HY_ATOE_CTYPE)
+                #define HY_ATOE_CTYPE
+
+                #undef isalnum
+                #undef isalpha
+                #undef iscntrl
+                #undef isdigit
+                #undef isgraph
+                #undef islower
+                #undef isprint
+                #undef ispunct
+                #undef isspace
+                #undef isupper
+                #undef isxdigit
+                #undef toupper
+                #undef tolower
+
+                extern int _ascii_is_tab[256];
+
+                #define _ISALNUM_ASCII  0x0001
+                #define _ISALPHA_ASCII  0x0002
+                #define _ISCNTRL_ASCII  0x0004
+                #define _ISDIGIT_ASCII  0x0008
+                #define _ISGRAPH_ASCII  0x0010
+                #define _ISLOWER_ASCII  0x0020
+                #define _ISPRINT_ASCII  0x0040
+                #define _ISPUNCT_ASCII  0x0080
+                #define _ISSPACE_ASCII  0x0100
+                #define _ISUPPER_ASCII  0x0200
+                #define _ISXDIGIT_ASCII 0x0400
+
+                #define _XUPPER_ASCII   0xdf                  
+                #define _XLOWER_ASCII   0x20                  
+
+                #define _IN_RANGE(c)   ((c >= 0) && (c <= 255))
+
+                #define isalnum(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISALNUM_ASCII) : 0)
+                #define isalpha(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISALPHA_ASCII) : 0)
+                #define iscntrl(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISCNTRL_ASCII) : 0)
+                #define isdigit(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISDIGIT_ASCII) : 0)
+                #define isgraph(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISGRAPH_ASCII) : 0)
+                #define islower(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISLOWER_ASCII) : 0)
+                #define isprint(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISPRINT_ASCII) : 0)
+                #define ispunct(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISPUNCT_ASCII) : 0)
+                #define isspace(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISSPACE_ASCII) : 0)
+                #define isupper(c)     (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISUPPER_ASCII) : 0)
+                #define isxdigit(c)    (_IN_RANGE(c) ? (_ascii_is_tab[c] & _ISXDIGIT_ASCII) : 0)
+
+                /*
+                 *  In ASCII, upper case characters have the bit off   
+                 */
+                #define toupper(c)     (islower(c) ? (c & _XUPPER_ASCII) : c)
+                #define tolower(c)     (isupper(c) ? (c | _XLOWER_ASCII) : c)
+
+        #endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/ctype.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dirent.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dirent.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dirent.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dirent.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,59 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/* 
+ * DESCRIPTION:
+ * Replace the system header file "dirent.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                      
+#include <//'PP.ADLE370.OS39028.SCEEH.H(dirent)'>     
+#else                                                 
+#include </usr/include/dirent.h>                      
+#endif                                                
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_DIRENT)
+		#define HY_ATOE_DIRENT
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+	    DIR*           atoe_opendir   (const char*);
+	    struct dirent* atoe_readdir   (DIR *dir);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef readdir
+		#undef opendir
+
+		#define opendir         atoe_opendir
+		#define readdir         atoe_readdir
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dirent.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dlfcn.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dlfcn.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dlfcn.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dlfcn.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,62 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "dlfcn.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#ifndef __SUSV3 /* To get correct definitions from dlfcn.h */
+#define __SUSV3
+#endif
+
+#if __TARGET_LIB__ == 0X22080000               
+#include <//'PP.ADLE370.OS39028.SCEEH.H(dlfcn)'> 
+#else                                          
+#include </usr/include/dlfcn.h>                  
+#endif                                         
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_DLFCN)
+		#define HY_ATOE_DLFCN
+
+		#ifdef __cplusplus
+                  extern "C" {
+		#endif
+
+	    void* atoe_dlopen(const char *, int);
+        void* atoe_dlsym(void *, const char *);
+		#ifdef __cplusplus
+                  }
+		#endif
+
+		#undef     dlopen
+        #undef     dlsym
+
+		#define    dlopen     atoe_dlopen
+        #define    dlsym      atoe_dlsym
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dlfcn.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dll.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dll.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dll.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dll.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,73 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "dll.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000               
+#include <//'PP.ADLE370.OS39028.SCEEH.H(dll)'> 
+#else                                          
+#include </usr/include/dll.h>                  
+#endif                                         
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_DLL)
+		#define HY_ATOE_DLL
+
+		#ifdef __cplusplus
+                  extern "C" {
+		#endif
+	        dllhandle* atoe_dllload(char *);
+		#ifdef __cplusplus
+                  }
+		#endif
+
+                #ifdef __cplusplus
+                  extern "C" {
+                #endif
+                void *atoe_dllqueryvar(dllhandle* dllHandle, char* varName);
+                #ifdef __cplusplus
+                  }
+                #endif
+
+                #ifdef __cplusplus
+                  extern "C" {
+                #endif 
+                void (*atoe_dllqueryfn(dllhandle* dllHandle, char* funcName)) ();
+                #ifdef __cplusplus
+                  }
+                #endif
+
+		#undef     dllload
+		#undef     dllqueryfn
+		#undef     dllqueryvar
+
+		#define    dllload     atoe_dllload
+		#define    dllqueryfn  atoe_dllqueryfn
+		#define    dllqueryvar  atoe_dllqueryvar
+
+	#endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/dll.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/fcntl.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/fcntl.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/fcntl.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/fcntl.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "fcntl.h" so that we can
+ * redefine the i/o functions that take/produce character
+ * strings with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                        
+#include <//'PP.ADLE370.OS39028.SCEEH.H(fcntl)'>        
+#else                                                   
+#include </usr/include/fcntl.h>                         
+#endif                                                  
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_FCNTL)
+		#define HY_ATOE_FCNTL
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+	int atoe_tagged_open( const char *fname, int options, ...);
+        int atoe_open(const char*, int, ...);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef open
+
+		#define open            atoe_open
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/fcntl.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/grp.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/grp.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/grp.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/grp.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * ===========================================================================
+ * DESCRIPTION:
+ * Replace the system header file "grp.h" so that we can redefine
+ * the functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+#if __TARGET_LIB__ == 0X22080000
+#include <//'PP.ADLE370.OS39028.SCEEH.H(grp)'>
+#else
+#include </usr/include/grp.h>
+#endif
+
+#if defined(HY_ATOE)
+
+    #if !defined(HY_ATOE_GRP)
+        #define HY_ATOE_GRP
+
+         /******************************************************************/
+         /*  Define prototypes for replacement functions.                  */
+         /******************************************************************/
+
+         #ifdef __cplusplus
+            extern "C" {
+         #endif
+
+         struct group *atoe_getgrgid(gid_t);
+
+         #ifdef __cplusplus
+            }
+         #endif
+
+         /******************************************************************/
+         /*  Undefine the functions                                        */
+         /******************************************************************/
+         #undef getgrgid
+
+         /******************************************************************/
+         /*  Redefine the functions                                        */
+         /******************************************************************/
+         #define getgrgid        atoe_getgrgid
+    #endif
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/grp.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/langinfo.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/langinfo.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/langinfo.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/langinfo.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "utsname.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ */
+
+#if __TARGET_LIB__ == 0X22080000                        
+#include <//'PP.ADLE370.OS39028.SCEEH.H(langinfo)'>     
+#else                                                   
+#include </usr/include/langinfo.h>                      
+#endif                                                  
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_LANGINFO)
+	    #define HY_ATOE_LANGINFO
+
+	#ifdef __cplusplus
+            extern "C" {
+	#endif
+
+            char * etoa_nl_langinfo(int);
+
+	#ifdef __cplusplus
+            }
+	#endif
+
+	#undef nl_langinfo
+	#define nl_langinfo(a)    etoa_nl_langinfo(a)
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/langinfo.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/locale.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/locale.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/locale.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/locale.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "locale.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                       
+#include <//'PP.ADLE370.OS39028.SCEEH.H(locale)'>      
+#else                                                  
+#include </usr/include/locale.h>                       
+#endif                                                 
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_LOCALE)
+		#define HY_ATOE_LOCALE
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        char * atoe_setlocale(int , const char *);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef setlocale
+
+		#define setlocale	atoe_setlocale
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/locale.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/netdb.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/netdb.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/netdb.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/netdb.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,61 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "netdb.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ */
+
+#if __TARGET_LIB__ == 0X22080000                  
+#include <//'PP.ADLE370.OS39028.SCEEH.H(netdb)'>                 
+#else                                                            
+#include </usr/include/netdb.h>                                  
+#endif                                                           
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_NETDB)
+		#define HY_ATOE_NETDB
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        struct hostent*  atoe_gethostbyname(const char *);                                    
+        struct hostent*  atoe_gethostbyname_r(char *, struct hostent *, char *, int, int *);  
+        struct hostent*  atoe_gethostbyaddr(const void *, int, int, struct hostent *, char *, int, int *);
+        struct protoent* atoe_getprotobyname(const char *name);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef  getprotobyname
+
+		#define gethostbyname   atoe_gethostbyname     
+		#define gethostbyname_r atoe_gethostbyname_r   
+		#define gethostbyaddr_r atoe_gethostbyaddr
+		#define getprotobyname  atoe_getprotobyname
+
+	#endif
+
+#endif
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/netdb.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/pwd.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/pwd.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/pwd.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/pwd.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "pwd.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ */
+
+#if __TARGET_LIB__ == 0X22080000                           
+#include <//'PP.ADLE370.OS39028.SCEEH.H(pwd)'>             
+#else                                                      
+#include </usr/include/pwd.h>                              
+#endif                                                     
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_PWD)
+		#define HY_ATOE_PWD
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        struct passwd* atoe_getpwuid(uid_t);
+        struct passwd* atoe_getpwnam(const char *);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef getpwuid
+		#undef getpwnam
+
+		#define getpwuid        atoe_getpwuid
+		#define getpwnam        atoe_getpwnam
+
+	#endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/pwd.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdio.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdio.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdio.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdio.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "pwd.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ */
+
+#if __TARGET_LIB__ == 0X22080000                           
+#include <//'PP.ADLE370.OS39028.SCEEH.H(pwd)'>             
+#else                                                      
+#include </usr/include/pwd.h>                              
+#endif                                                     
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_PWD)
+		#define HY_ATOE_PWD
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        struct passwd* atoe_getpwuid(uid_t);
+        struct passwd* atoe_getpwnam(const char *);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef getpwuid
+		#undef getpwnam
+
+		#define getpwuid        atoe_getpwuid
+		#define getpwnam        atoe_getpwnam
+
+	#endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdio.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdlib.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdlib.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdlib.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdlib.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,85 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "stdlib.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000               
+#include <//'PP.ADLE370.OS39028.SCEEH.H(stdlib)'>
+#else                                            
+#include </usr/include/stdlib.h>                 
+#endif                                           
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_STDLIB)
+		#define HY_ATOE_STDLIB
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        double     atoe_atof      (const char *);            
+        int        atoe_atoi      (const char *);
+        int        atoe_atol      (const char *);            
+        char*      atoe_getenv    (const char*);
+        int        atoe_putenv    (const char*);
+        char *     atoe_realpath  (const char*, char*);
+        double     atoe_strtod    (const char *,char **);
+        int        atoe_strtol    (const char *,char **, int);
+        unsigned long atoe_strtoul (const char *,char **, int);
+	unsigned long long atoe_strtoull( const char *, char **, int );
+        int        atoe_system    (const char *);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+        #undef atof                                    
+		#undef atoi
+        #undef atol                                    
+		#undef getenv
+		#undef putenv
+		#undef realpath
+		#undef strtod
+        #undef strtol                                  
+        #undef strtoul                                 
+		#undef strtoull
+		#undef system
+
+        #define atof	 atoe_atof                     
+		#define atoi	 atoe_atoi
+        #define atol	 atoe_atol                     
+		#define getenv	 atoe_getenv
+		#define putenv	 atoe_putenv
+		#define realpath atoe_realpath
+		#define strtod	 atoe_strtod
+        #define strtol   atoe_strtol               
+        #define strtoul  atoe_strtoul                    
+		#define strtoull atoe_strtoull
+		#define system	 atoe_system
+
+	#endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/stdlib.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/string.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/string.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/string.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/string.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "string.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                 
+#include <//'PP.ADLE370.OS39028.SCEEH.H(string)'>
+#else                                            
+#include </usr/include/string.h>                 
+#endif                                           
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_STRING)
+		#define HY_ATOE_STRING
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        char* atoe_strerror(int);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef strerror
+
+		#define strerror        atoe_strerror
+
+	#endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/string.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/ipc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/ipc.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/ipc.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/ipc.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "ipc.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                       
+#include <//'PP.ADLE370.OS39028.SCEEH.SYS.H(ipc)'>     
+#else                                                  
+#include </usr/include/sys/ipc.h>                      
+#endif                                                 
+
+#if defined(HY_ATOE)
+   #if !defined(HY_ATOE_SYS_FTOK)
+      #define HY_ATOE_SYS_FTOK
+
+      #ifdef __cplusplus
+         extern "C" {
+      #endif
+
+            int atoe_ftok(const char *, int);
+
+      #ifdef __cplusplus
+         }
+      #endif
+
+      #undef ftok
+      #define ftok atoe_ftok
+
+   #endif
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/ipc.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/stat.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/stat.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/stat.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/stat.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,64 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "stat.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if !defined(HY_STAT_INCLUDED)  
+#define HY_STAT_INCLUDED        
+
+#include </usr/include/sys/stat.h>       
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_SYS_STAT)
+		#define HY_ATOE_SYS_STAT
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        int atoe_mkdir (const char*, mode_t);
+        int atoe_remove (const char*);                
+        int atoe_chmod (const char*, mode_t);         
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef mkdir
+        #undef remove                                 
+		#undef stat
+		#undef chmod                                  
+
+		#define mkdir           atoe_mkdir
+        #define remove          atoe_remove             
+		#define stat(a,b)       atoe_stat(a,b)
+		#define lstat(a,b)      atoe_lstat(a,b)
+        #define chmod           atoe_chmod              
+
+	#endif
+
+#endif
+#endif 

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/stat.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/time.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/time.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/time.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/time.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "time.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#ifndef FD_SETSIZE               
+#define FD_SETSIZE  65535        
+#endif                           
+
+#if __TARGET_LIB__ == 0X22080000 
+#include <//'PP.ADLE370.OS39028.SCEEH.SYS.H(time)'> 
+#else                                               
+#include </usr/include/sys/time.h>                  
+#endif                                              
+
+#if defined(HY_ATOE)
+   #if !defined(HY_ATOE_SYS_TIME)
+      #define HY_ATOE_SYS_TIME
+
+      /******************************************************************/
+      /*  Define prototypes for replacement functions.                  */
+      /******************************************************************/
+
+      #ifdef __cplusplus
+         extern "C" {
+      #endif
+
+      int atoe_utimes(const char *, const struct timeval *);
+
+      #ifdef __cplusplus
+         }
+      #endif
+
+      /******************************************************************/
+      /*  Undefine the functions                                        */
+      /******************************************************************/
+      #undef  utimes
+
+      /******************************************************************/
+      /*  Redefine the functions                                        */
+      /******************************************************************/
+      #define utimes   atoe_utimes
+
+   #endif
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/time.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/utsname.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/utsname.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/utsname.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/utsname.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,58 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "utsname.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                         
+#include <//'PP.ADLE370.OS39028.SCEEH.SYS.H(utsname)'>   
+#else                                                    
+#include </usr/include/sys/utsname.h>                    
+#endif                                                   
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_SYS_UTSNAME)
+	    #define HY_ATOE_SYS_UTSNAME
+
+	#ifdef __cplusplus
+            extern "C" {
+	#endif
+
+            int etoa_uname(struct utsname *);
+            int etoa___osname(struct utsname *);     
+
+	#ifdef __cplusplus
+            }
+	#endif
+
+	#undef uname
+	#define uname(a)    etoa_uname(a)
+
+	#undef __osname                                  
+	#define __osname(a) etoa___osname(a)             
+
+    #endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/sys/utsname.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/time.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/time.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/time.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/time.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,60 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "time.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#define _OPEN_MSGQ_EXT                               
+
+#if __TARGET_LIB__ == 0X22080000                     
+#include <//'PP.ADLE370.OS39028.SCEEH.H(time)'>      
+#else                                                
+#include </usr/include/time.h>                       
+#endif                                               
+
+#if defined(HY_ATOE)
+
+	#if !defined(HY_ATOE_TIME)
+		#define HY_ATOE_TIME
+
+		#ifdef __cplusplus
+            extern "C" {
+		#endif
+
+        char * atoe_ctime     (const time_t*);
+        size_t atoe_strftime  (char*, size_t,const char*, const struct tm*);
+
+		#ifdef __cplusplus
+            }
+		#endif
+
+		#undef ctime
+		#undef strftime
+
+		#define ctime           atoe_ctime
+		#define strftime        atoe_strftime
+
+	#endif
+
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/time.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/unistd.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/unistd.h?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/unistd.h (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/unistd.h Tue Sep  1 15:06:16 2009
@@ -0,0 +1,93 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/*
+ * DESCRIPTION:
+ * Replace the system header file "unistd.h" so that we can redefine
+ * the i/o functions that take/produce character strings
+ * with our own ATOE functions.
+ *
+ * The compiler will find this header file in preference to the system one.
+ * ===========================================================================
+ */
+
+#if __TARGET_LIB__ == 0X22080000                    
+#include <//'PP.ADLE370.OS39028.SCEEH.H(unistd)'>   
+#else                                               
+#include </usr/include/unistd.h>                    
+#endif                                              
+
+#if defined(HY_ATOE)
+
+   #if !defined(HY_ATOE_UNISTD)
+      #define HY_ATOE_UNISTD
+
+      /******************************************************************/
+      /*  Define prototypes for replacement functions.                  */
+      /******************************************************************/
+
+      #ifdef __cplusplus
+         extern "C" {
+      #endif
+
+      int        atoe_access     (const char*, int);
+      char *     atoe_getcwd     (char*, size_t);
+      extern int atoe_gethostname(char *, int);
+      char *     atoe_getlogin   (void);
+      int        atoe_unlink     (const char*);
+      int        atoe_chdir (const char*);                
+      int        atoe_chown      (const char*, uid_t, gid_t);
+      int        atoe_rmdir (const char *);
+      int        atoe_execv (const char *, char *const []);
+      int        atoe_execvp (const char *, char *const []);
+
+      #ifdef __cplusplus
+         }
+      #endif
+
+      /******************************************************************/
+      /*  Undefine the functions                                        */
+      /******************************************************************/
+
+      #undef access
+      #undef getcwd
+      #undef gethostname
+      #undef getlogin
+      #undef unlink
+      #undef chown
+      #undef rmdir
+      #undef chdir
+      #undef execv
+      #undef execvp
+
+      /******************************************************************/
+      /*  Redefine the functions                                        */
+      /******************************************************************/
+
+      #define access(a,b)     atoe_access(a,b)
+      #define getcwd          atoe_getcwd
+      #define gethostname     atoe_gethostname
+      #define getlogin        atoe_getlogin
+      #define unlink          atoe_unlink
+      #define chdir           atoe_chdir                          
+      #define chown           atoe_chown
+      #define rmdir           atoe_rmdir      
+      #define execv           atoe_execv
+      #define execvp           atoe_execvp
+
+   #endif
+#endif

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/headers/unistd.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/makefile?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/makefile (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/makefile Tue Sep  1 15:06:16 2009
@@ -0,0 +1,31 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+#
+# Makefile for module 'a2e'
+#
+
+include $(HY_HDK)/build/make/defines.mk
+
+INCLUDES += -DHYPORT_LIBRARY_DEFINE
+
+BUILDFILES = sysTranslate.o atoe.o atoe_utils.o
+
+MDLLIBFILES =
+
+DLLNAME = ../libhya2e$(HY_SHLIB_SUFFIX)
+LIBNAME = $(LIBPATH)libhya2e.a
+
+include $(HY_HDK)/build/make/rules.mk

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/makefile
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/sysTranslate.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/sysTranslate.c?rev=810084&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/sysTranslate.c (added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/sysTranslate.c Tue Sep  1 15:06:16 2009
@@ -0,0 +1,43 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+#pragma map(sysTranslate, "SYSXLATE")
+#include <builtins.h>
+
+char* 
+sysTranslate(const char *source, int length, char *trtable, char* xlate_buf) { 
+   int i = 0; 
+
+   memcpy(xlate_buf, source, length);  /* copy source to target */
+
+#if __COMPILER_VER >= 0x41050000
+   /* If the compiler level supports the fast builtin for translation, use it 
+      on the first n*256 bytes of the string
+    */
+   for (; length > 255; i += 256, length -=256) { 
+       __tr(xlate_buf+i, trtable, 255); 
+          
+   }
+#endif
+   
+   for (; length > 0; i++, length--) {      /* translate */
+      xlate_buf[i] = trtable[source[i]]; 
+   }
+
+   xlate_buf[i] = '\0';                /* null terminate */
+   return xlate_buf; 
+}

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/a2e/unix/sysTranslate.c
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c?rev=810084&r1=810083&r2=810084&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/strhelp.c Tue Sep  1 15:06:16 2009
@@ -18,6 +18,9 @@
 #include <string.h>
 #include "hyport.h"
 #include "strhelp.h"
+#ifdef ZOS
+#include "atoe.h"
+#endif
 
 static int prop_alloc(HyPortLibrary * portLibrary, key_value_pair* property,
                       char* start, char* delim, char* end);
@@ -168,6 +171,11 @@
         return JNI_ERR;
     }
 
+#ifdef ZOS
+    /* Convert the scan buffer into ASCII */
+    scanCursor = e2a(scanCursor, seekResult);
+#endif
+
     fileSize = (IDATA) seekResult;
     arraySize = fileSize/50 + 1;
     props = hymem_allocate_memory(sizeof(key_value_pair)*(arraySize + 1));

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hyport.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hyport.h?rev=810084&r1=810083&r2=810084&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hyport.h (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/include/shared/hyport.h Tue Sep  1 15:06:16 2009
@@ -1046,6 +1046,7 @@
 #define HYPORT_CAPABILITY_SOCKETS  4
 #define HYPORT_CAPABILITY_LARGE_PAGE_SUPPORT  8
 #define HYPORT_MMAP_CAPABILITY_COPYONWRITE  1
+#define HYPORT_MMAP_CAPABILITY_READ  2
 #define HYPORT_MMAP_FLAG_CREATE_FILE  1
 #define HYPORT_MMAP_FLAG_READ  2
 #define HYPORT_MMAP_FLAG_WRITE  4



Mime
View raw message