From mint-bounce@lists.fishpool.fi Sun Oct 4 16:57:36 2009 Message-ID: <4AC90B70.4020501@freesbee.fr> Date: Sun, 04 Oct 2009 22:54:08 +0200 From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mint Subject: [MiNT] rindex cleanup Content-Type: multipart/mixed; boundary="------------000701000807030602080804" X-Antivirus: avast! (VPS 091004-0, 04/10/2009), Outbound message X-Antivirus-Status: Clean X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: vincent.riviere@freesbee.fr Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: This is a multi-part message in MIME format. --------------000701000807030602080804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hello. The attached patch for the MiNTLib defines the rindex alias for strrchr i= n a=20 more portable way. Actually, this is the only change required to successfully compile the=20 MiNTLib using the ELF object file format ;-) Please commit it using the following comment: ---------------------------------------------------------------------- Define the rindex alias for strrchr in a more portable way. Contributed by Vincent Riviere. ---------------------------------------------------------------------- --=20 Vincent Rivi=E8re --------------000701000807030602080804 Content-Type: text/plain; name="rindex.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rindex.patch" diff -x CVS -aurN mintlib.orig/string/strrchr.c mintlib/string/strrchr.c --- mintlib.orig/string/strrchr.c 2009-05-17 18:13:06.812500000 +0200 +++ mintlib/string/strrchr.c 2009-10-04 15:17:42.000000000 +0200 @@ -4,17 +4,6 @@ /* * strrchr - find last occurrence of a character in a string */ -#ifdef __GNUC__ -__asm__(".stabs \"_rindex\",5,0,0,_strrchr"); /* dept of clean tricks */ -#else -char * -rindex(s, charwanted) - const char *s; - int charwanted; -{ - return strrchr(s, charwanted); -} -#endif char * /* found char, or NULL if none */ strrchr(s, charwanted) @@ -32,3 +21,5 @@ return((char *)--s); return (char *)place; } + +strong_alias (strrchr, rindex) --------------000701000807030602080804--