[Date Prev][Date Next] [Chronological] [Thread] [Top]



After a long time doing other things I am returning to port OpenLDAP to an EBCDIC machine.
I have done the following:
- check out the tag OPENLDAP_REL_ENG_2.
- patch build/ltmain.sh (attached).
- use libregex from Apache-1.3 and snprintf/sockaddr_ip_get from APR (Apache Portable Runtime).
- use getgrnam and initgr specific to the machine.
And now I have a slapd that starts but does nothing else has he speaks EBCDIC.

I have to integrate OpenLDAP in an EBCDIC environment (strings _have_ to be EBCDIC strings). So I will convert the data in input/output as I have to link OpenLDAP with other API that are prepared to work that way.

The EBCDIC topic appaired last year in the dev list but I do not know what is the actual status of the porting.

Any comments or hints?


Index: build/ltmain.sh
RCS file: /home/cvs/OpenLDAP/pkg/ldap/build/ltmain.sh,v
retrieving revision
diff -u -r1.5.2.7 ltmain.sh
--- build/ltmain.sh     6 Nov 2001 16:29:18 -0000
+++ build/ltmain.sh     28 Feb 2003 15:07:44 -0000
@@ -76,8 +76,17 @@
 # metacharacters that are still active within double-quoted strings.
 Xsed='sed -e 1s/^X//'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
+# test EBCDIC or ASCII
+case `echo A|od -x` in
+ *[Cc]1*) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.