New file: Zdist patch.
[egate.git] / zdist.patch
diff --git a/zdist.patch b/zdist.patch
new file mode 100644 (file)
index 0000000..daedd19
--- /dev/null
@@ -0,0 +1,119 @@
+diff -r -c --exclude=*.[oa] --exclude=*.bak --exclude=Makefile* zdist102b1-1/libz3950/z3950.h zdist102b1-1f/libz3950/z3950.h
+*** zdist102b1-1/libz3950/z3950.h      Fri Oct 28 18:42:20 1994
+--- zdist102b1-1f/libz3950/z3950.h     Thu Feb 16 17:33:39 1995
+***************
+*** 126,132 ****
+  
+  #define MEMCOPY(a,b,c) memcpy(a,b,c)
+  #define NEWSTRUCT(a) (a far *)imem_calloc(1,sizeof(a))
+! #define NEWSTRING(a) (PCHR)imem_calloc(1,a)
+  #define NEWUSTRING(a) (PUCHR)imem_calloc(1,a)
+  #define FREE(a) imem_free(a)
+  #define Z3950_VERSION_2 "11000000"
+--- 126,132 ----
+  
+  #define MEMCOPY(a,b,c) memcpy(a,b,c)
+  #define NEWSTRUCT(a) (a far *)imem_calloc(1,sizeof(a))
+! #define NEWSTRING(a) (PCHR)imem_calloc(1,(a) + 1)
+  #define NEWUSTRING(a) (PUCHR)imem_calloc(1,a)
+  #define FREE(a) imem_free(a)
+  #define Z3950_VERSION_2 "11000000"
+diff -r -c --exclude=*.[oa] --exclude=*.bak --exclude=Makefile* zdist102b1-1/libz3950/z3950sup.c zdist102b1-1f/libz3950/z3950sup.c
+*** zdist102b1-1/libz3950/z3950sup.c   Sun Dec  4 14:28:04 1994
+--- zdist102b1-1f/libz3950/z3950sup.c  Thu Jul  6 14:02:12 1995
+***************
+*** 339,344 ****
+--- 339,345 ----
+                       return rro;
+       
+               /* Hang it under the Operator node */
++              OP->form = 0;
+               Operator_SetType(Operator, OP);
+  
+               RpnRpnOp_SetOp(rro, Operator);
+***************
+*** 1605,1611 ****
+  {
+       PAND a;
+  
+!      if((a=dmake(AND_TAG, ASN1_CONTEXT, 1))==NULL) {
+                  /* Enter any error logging here */
+                  return NULL;
+          }
+--- 1606,1612 ----
+  {
+       PAND a;
+  
+!      if((a=dmake(AND_TAG, ASN1_CONTEXT, 2))==NULL) {
+                  /* Enter any error logging here */
+                  return NULL;
+          }
+***************
+*** 1616,1622 ****
+  {
+       POR a;
+  
+!      if((a=dmake(OR_TAG, ASN1_CONTEXT, 1))==NULL) {
+                  /* Enter any error logging here */
+                  return NULL;
+          }
+--- 1617,1623 ----
+  {
+       POR a;
+  
+!      if((a=dmake(OR_TAG, ASN1_CONTEXT, 2))==NULL) {
+                  /* Enter any error logging here */
+                  return NULL;
+          }
+***************
+*** 1627,1633 ****
+  {
+       PANDNOT a;
+  
+!      if((a=dmake(ANDNOT_TAG, ASN1_CONTEXT, 1))==NULL) {
+                  /* Enter any error logging here */
+                  return NULL;
+          }
+--- 1628,1634 ----
+  {
+       PANDNOT a;
+  
+!      if((a=dmake(ANDNOT_TAG, ASN1_CONTEXT, 2))==NULL) {
+                  /* Enter any error logging here */
+                  return NULL;
+          }
+diff -r -c --exclude=*.[oa] --exclude=*.bak --exclude=Makefile* zdist102b1-1/libz3950/zstats.c zdist102b1-1f/libz3950/zstats.c
+*** zdist102b1-1/libz3950/zstats.c     Fri Oct 28 18:42:22 1994
+--- zdist102b1-1f/libz3950/zstats.c    Tue Dec 20 16:17:45 1994
+***************
+*** 203,213 ****
+--- 203,215 ----
+  
+       fd = fileno(ffp);
+  
++ #if 0
+       if(lockf(fd, F_LOCK, 0)!=0) {
+               perror("zstats_WriteLog:locking");
+               fclose(ffp);
+               return;
+       }
++ #endif
+  
+       fwrite(s->Host, sizeof(s->Host), 1, ffp);
+       fwrite(&s->Time, sizeof(time_t), 1, ffp);
+***************
+*** 238,248 ****
+--- 240,252 ----
+       fwrite(&s->ExtendedServicesResponseCount, sizeof(INT4), 1, ffp);
+       fwrite(&s->CloseRequestCount, sizeof(INT4), 1, ffp);
+  
++ #if 0
+       if(lockf(fd, F_ULOCK, 0)!=0) {
+               perror("zstats_WriteLog:unlocking");
+               fclose(ffp);
+               return;
+       }
++ #endif
+  
+       fclose(ffp);
+  }