]> git.sur5r.net Git - openldap/blobdiff - libraries/liblber/lber-int.h
AC_STRERROR_R
[openldap] / libraries / liblber / lber-int.h
index 1d6ad83ba3a2bb841539d4910cd1f5c9b08a2ecb..7686cd57d90344b056aedda0547823f04e30c8e5 100644 (file)
@@ -1,10 +1,18 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
-/* Portions
- * Copyright (c) 1990 Regents of the University of Michigan.
+/* Portions Copyright (c) 1990 Regents of the University of Michigan.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted
@@ -84,6 +92,7 @@ struct berelement {
 
        struct seqorset *ber_sos;
        char            *ber_rwptr;
+       void            *ber_memctx;
 };
 #define LBER_VALID(ber)        ((ber)->ber_valid==LBER_VALID_BERELEMENT)
 
@@ -123,6 +132,11 @@ ber_realloc LDAP_P((
        BerElement *ber,
        ber_len_t len ));
 
+LBER_F (char *) ber_start LDAP_P(( BerElement * ));
+LBER_F (int) ber_len LDAP_P(( BerElement * ));
+LBER_F (int) ber_ptrlen LDAP_P(( BerElement * ));
+LBER_F (void) ber_rewind LDAP_P(( BerElement * ));
+
 /*
  * bprint.c
  */
@@ -164,18 +178,8 @@ LBER_V (FILE *) ber_pvt_err_file;
        /* simple macros to realloc for now */
 LBER_V (BerMemoryFunctions *)  ber_int_memory_fns;
 LBER_F (char *)        ber_strndup( LDAP_CONST char *, ber_len_t );
-LBER_F (char *)        ber_strndup__( LDAP_CONST char *, size_t );
-
-#ifdef CSRIMALLOC
-#define LBER_MALLOC                    malloc
-#define LBER_CALLOC                    calloc
-#define LBER_REALLOC           realloc
-#define LBER_FREE                      free
-#define LBER_VFREE                     ber_memvfree
-#define LBER_STRDUP                    strdup
-#define LBER_STRNDUP           ber_strndup__
-
-#else
+LBER_F (char *)        ber_strndup_x( LDAP_CONST char *, ber_len_t, void *ctx );
+
 #define LBER_MALLOC(s)         ber_memalloc((s))
 #define LBER_CALLOC(n,s)       ber_memcalloc((n),(s))
 #define LBER_REALLOC(p,s)      ber_memrealloc((p),(s))
@@ -183,7 +187,6 @@ LBER_F (char *)     ber_strndup__( LDAP_CONST char *, size_t );
 #define LBER_VFREE(v)          ber_memvfree((void**)(v))
 #define LBER_STRDUP(s)         ber_strdup((s))
 #define LBER_STRNDUP(s,l)      ber_strndup((s),(l))
-#endif
 
 /* sockbuf.c */