OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
3.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../procmail/getline.patch
  5. # Copyright (C) 2010 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Avoid conflict with glibc's getline function.
  17. diff -ruN procmail-3.22-orig/src/fields.c procmail-3.22/src/fields.c
  18. --- procmail-3.22-orig/src/fields.c 2001-09-11 06:57:08.000000000 +0200
  19. +++ procmail-3.22/src/fields.c 2010-07-26 17:28:30.700504572 +0200
  20. @@ -110,16 +110,16 @@
  21. /* try and append one valid field to rdheader from stdin */
  22. int readhead P((void))
  23. { int idlen;
  24. - getline();
  25. + procmail_getline();
  26. if((idlen=breakfield(buf,buffilled))<=0) /* not the start of a valid field */
  27. return 0;
  28. if(idlen==STRLEN(FROM)&&eqFrom_(buf)) /* it's a From_ line */
  29. { if(rdheader)
  30. return 0; /* the From_ line was a fake! */
  31. - for(;buflast=='>';getline()); /* gather continued >From_ lines */
  32. + for(;buflast=='>';procmail_getline()); /* gather continued >From_ lines */
  33. }
  34. else
  35. - for(;;getline()) /* get the rest of the continued field */
  36. + for(;;procmail_getline()) /* get the rest of the continued field */
  37. { switch(buflast) /* will this line be continued? */
  38. { case ' ':case '\t': /* yep, it sure is */
  39. continue;
  40. diff -ruN procmail-3.22-orig/src/formail.c procmail-3.22/src/formail.c
  41. --- procmail-3.22-orig/src/formail.c 2001-09-11 06:57:32.000000000 +0200
  42. +++ procmail-3.22/src/formail.c 2010-07-26 17:28:30.696504668 +0200
  43. @@ -819,7 +819,7 @@
  44. { if(split) /* gobble up the next start separator */
  45. { buffilled=0;
  46. #ifdef sMAILBOX_SEPARATOR
  47. - getline();buffilled=0; /* but only if it's defined */
  48. + procmail_getline();buffilled=0; /* but only if it's defined */
  49. #endif
  50. if(buflast!=EOF) /* if any */
  51. goto splitit;
  52. diff -ruN procmail-3.22-orig/src/formisc.c procmail-3.22/src/formisc.c
  53. --- procmail-3.22-orig/src/formisc.c 2001-06-29 04:20:45.000000000 +0200
  54. +++ procmail-3.22/src/formisc.c 2010-07-26 17:28:30.692019896 +0200
  55. @@ -115,7 +115,7 @@
  56. buf[buffilled++]=c;
  57. }
  58. -int getline P((void)) /* read a newline-terminated line */
  59. +int procmail_getline P((void)) /* read a newline-terminated line */
  60. { if(buflast==EOF) /* at the end of our Latin already? */
  61. { loadchar('\n'); /* fake empty line */
  62. return EOF; /* spread the word */
  63. diff -ruN procmail-3.22-orig/src/formisc.h procmail-3.22/src/formisc.h
  64. --- procmail-3.22-orig/src/formisc.h 1999-04-19 08:42:15.000000000 +0200
  65. +++ procmail-3.22/src/formisc.h 2010-07-26 17:28:30.700504572 +0200
  66. @@ -17,4 +17,4 @@
  67. char*
  68. skipwords P((char*start));
  69. int
  70. - getline P((void));
  71. + procmail_getline P((void));