Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-07-01 12:45:52 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-07-01 12:45:52 +0400
commitca56076ae22c4e4eaafed078c3d0a3b29871e385 (patch)
treec365edee96208ae42acf6d937719fdfc4ba3cc53 /newlib
parent5eb491d26e14e7f46f99aabc692322e864fcdd8d (diff)
2010-06-29 Antony King <antony.king@sr.com>
* libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by _NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib 1.16.0 and earlier. 2010-06-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> * libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog10
-rw-r--r--newlib/libc/ctype/ctype_.c32
-rw-r--r--newlib/libc/include/sys/stat.h6
3 files changed, 48 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 56c16de82..21bce979d 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,13 @@
+2010-06-29 Antony King <antony.king@sr.com>
+
+ * libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
+ _NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
+ 1.16.0 and earlier.
+
+2010-06-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
+
2010-06-18 Pavel Pisa <ppisa4lists@pikron.com>
* libc/include/machine/ieeefp.h[__arm__][!__VFP_FP__]: Set to
diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c
index 78212776c..c3615d2a1 100644
--- a/newlib/libc/ctype/ctype_.c
+++ b/newlib/libc/ctype/ctype_.c
@@ -98,6 +98,13 @@ char _ctype_b[128 + 256] = {
_CTYPE_DATA_128_255
};
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+#ifndef _MB_CAPABLE
+_CONST
+#endif
+char __EXPORT *__ctype_ptr = (char *) _ctype_b + 128;
+#endif
+
#ifndef _MB_CAPABLE
_CONST
#endif
@@ -129,6 +136,13 @@ _CONST char _ctype_[1 + 256] = {
_CTYPE_DATA_128_255
};
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+#ifndef _MB_CAPABLE
+_CONST
+#endif
+char *__ctype_ptr = (char *) _ctype_ + 1;
+#endif
+
#ifndef _MB_CAPABLE
_CONST
#endif
@@ -160,8 +174,14 @@ __set_ctype (const char *charset)
else
++idx;
# if defined(ALLOW_NEGATIVE_CTYPE_INDEX)
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+ __ctype_ptr = (char *) (__ctype_iso[idx] + 128);
+#endif
__ctype_ptr__ = (char *) (__ctype_iso[idx] + 127);
# else
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+ __ctype_ptr = (char *) __ctype_iso[idx] + 1;
+#endif
__ctype_ptr__ = (char *) __ctype_iso[idx];
# endif
return;
@@ -172,8 +192,14 @@ __set_ctype (const char *charset)
if (idx < 0)
break;
# if defined(ALLOW_NEGATIVE_CTYPE_INDEX)
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+ __ctype_ptr = (char *) (__ctype_cp[idx] + 128);
+#endif
__ctype_ptr__ = (char *) (__ctype_cp[idx] + 127);
# else
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+ __ctype_ptr = (char *) __ctype_cp[idx] + 1;
+#endif
__ctype_ptr__ = (char *) __ctype_cp[idx];
# endif
return;
@@ -182,8 +208,14 @@ __set_ctype (const char *charset)
break;
}
# if defined(ALLOW_NEGATIVE_CTYPE_INDEX)
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+ __ctype_ptr = (char *) _ctype_b + 128;
+#endif
__ctype_ptr__ = (char *) _ctype_b + 127;
# else
+#ifdef _NEED_OLD_CTYPE_PTR_DEFINITION
+ __ctype_ptr = (char *) _ctype_ + 1;
+#endif
__ctype_ptr__ = (char *) _ctype_;
# endif
}
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index 9d8bdfb65..2c69c4852 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -122,6 +122,12 @@ struct stat
#define S_IWOTH 0000002 /* write permission, other */
#define S_IXOTH 0000001/* execute/search permission, other */
+#ifndef _POSIX_SOURCE
+#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */
+#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */
+#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */
+#endif
+
#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)