From cd5c9e6a923878e797212d27476ee217eb844a14 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 11 Feb 2021 15:40:48 +0100 Subject: Added Linux compatibility --- ft_strlen.s | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'ft_strlen.s') diff --git a/ft_strlen.s b/ft_strlen.s index 2f2dd26..b0f84e7 100644 --- a/ft_strlen.s +++ b/ft_strlen.s @@ -10,10 +10,17 @@ ; ; ; **************************************************************************** ; -global _ft_strlen +%ifdef __LINUX__ + %define M_FT_STRLEN ft_strlen +%else + %define M_FT_STRLEN _ft_strlen +%endif +global M_FT_STRLEN + +section .text ; int ft_strlen(char *); -_ft_strlen: +M_FT_STRLEN: mov eax, -1 FT_STRLEN_LOOP: inc eax -- cgit