#! /bin/sh /usr/share/dpatch/dpatch-run ## 13_const_char.dpatch by YAMASHITA Junji ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix compiling with g++-4.4 @DPATCH@ diff -urNad postman-2.1~/Utils.cc postman-2.1/Utils.cc --- postman-2.1~/Utils.cc 2010-04-30 04:45:39.000000000 +0900 +++ postman-2.1/Utils.cc 2010-04-30 04:45:56.000000000 +0900 @@ -50,7 +50,7 @@ return ABuf; } -char *getExtensionFromFile (const char *fn) +const char *getExtensionFromFile (const char *fn) { if (fn == NULL) return ""; if (strchr(fn, '.') == NULL) return ""; @@ -479,7 +479,7 @@ //DEVUELVE LA POSICION DE UN SUBSTRING EN UN STRING IMPORTANDO EL CASE int Cstrstr (const char *linea, const char *token) { - char *p; + const char *p; p = strstr (linea, token); if (p == NULL) return 0; return (p - linea + 1); diff -urNad postman-2.1~/Utils.h postman-2.1/Utils.h --- postman-2.1~/Utils.h 2005-03-21 19:31:17.000000000 +0900 +++ postman-2.1/Utils.h 2010-05-02 22:57:22.000000000 +0900 @@ -222,7 +222,7 @@ void Randomize (); int Rand (int max); char *MakeTmpName (TBuffer fntmp, int maxlong); -char *getExtensionFromFile (const char *fn); +const char *getExtensionFromFile (const char *fn); bool FileExists (const char *fn); int FileSize (const char *fn); time_t FileDate (char *fn); diff -urNad postman-2.1~/CCLIENT.cc postman-2.1/CCLIENT.cc --- postman-2.1~/CCLIENT.cc 2005-03-21 18:20:15.000000000 +0900 +++ postman-2.1/CCLIENT.cc 2010-05-02 23:04:35.000000000 +0900 @@ -1613,7 +1613,7 @@ void CCLIENT::getMailboxes (StringList *SL, StringList *SLSubscribedGroups, bool refreshIMAPFolders, bool ALLOW_NNTP) { - char *pc, *pc1, *pc2; + const char *pc, *pc1, *pc2; TBuffer abuf, abuf2, abuf3, mbinbox; setError (false); if (refreshIMAPFolders == true) diff -urNad postman-2.1~/ClientFileBrowser.cc postman-2.1/ClientFileBrowser.cc --- postman-2.1~/ClientFileBrowser.cc 2010-05-02 23:09:53.000000000 +0900 +++ postman-2.1/ClientFileBrowser.cc 2010-05-02 23:11:04.000000000 +0900 @@ -161,7 +161,7 @@ const char *ClientFileBrowser::obtainRelDir (const char *FullDir, TBuffer reldir) { - char *pc; + const char *pc; if (strcmp (FullDir, RestrictedPath) == 0) {xstrncpy (reldir, CMAXBUFFER, "/"); return reldir;} pc = strstr (FullDir, RestrictedPath); if (pc == NULL) {addLastSlash (reldir);}