#2 Cygwin compile fix

open
nobody
None
5
2007-12-20
2007-12-20
Jari Aalto
No

Cygwin already includes strlwr. Here is patch.

From bdb75373b0e6b68fc6bf684023caa6fe9ce851d7 Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Thu, 20 Dec 2007 12:27:22 +0200
Subject: [PATCH] str.[ch]: strlwr __GYGWIN__

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
str.c | 4 ++++
str.h | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/str.c b/str.c
index 5f755dd..6e667d6 100644
--- a/str.c
+++ b/str.c
@@ -11,6 +11,8 @@
#include "dbg.h"
#include "str.h"

+#ifndef __CYGWIN__
+
void strlwr( char* s )
{
while( *s != '\0' )
@@ -20,6 +22,8 @@ void strlwr( char* s )
}
}

+#endif
+
void strcpylwr( char* d, const char* s )
{
while( *s != '\0' )
diff --git a/str.h b/str.h
index b946fe9..11b72d1 100644
--- a/str.h
+++ b/str.h
@@ -10,8 +10,14 @@
#ifndef _STR_H
#define _STR_H

-/* a couple of generic string functions... */
+/* a couple of generic string functions...
+ Cygwin already includes strlwr()
+*/
+
+#ifndef __CYGWIN__
void strlwr( char* s );
+#endif
+
void strcpylwr( char* d, const char* s );
void strncpylwr( char* d, const char* s, int n );

--
1.5.4-rc0.GIT

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks