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
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-04-30 15:30:14 +0400
committerNick Clifton <nickc@redhat.com>2014-04-30 15:30:14 +0400
commit179e25f0df0e8e6703be95ef7efa5819d6f3af7d (patch)
treee489f5b8da79eb824ab9440ed07a4800bcac20cd /libgloss/msp430/unlink.c
parent6e062439422d50c4092b2e1b9815771c4a74c890 (diff)
* msp430/Makefile.in (NOSYS_OBJS): Add unlink.o.
(SCRIPTS): Remove msp430F5438A-s.ld and msp430F5438A-s.ld. * unlink.c: New file.
Diffstat (limited to 'libgloss/msp430/unlink.c')
-rw-r--r--libgloss/msp430/unlink.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libgloss/msp430/unlink.c b/libgloss/msp430/unlink.c
new file mode 100644
index 000000000..1c8c6f233
--- /dev/null
+++ b/libgloss/msp430/unlink.c
@@ -0,0 +1,25 @@
+#include <string.h>
+
+#include "cio.h"
+
+signed int
+unlink (const char * name)
+{
+ unsigned len = strlen (name);
+
+ if (len >= CIO_BUF_SIZE)
+ return -1;
+
+ __CIOBUF__.length[0] = len;
+ __CIOBUF__.length[1] = len >> 8;
+ __CIOBUF__.parms[0] = CIO_UNLINK;
+ __CIOBUF__.parms[1] = len;
+ __CIOBUF__.parms[2] = len >> 8;
+ memcpy (__CIOBUF__.buf, name, len);
+
+ _libgloss_cio_hook ();
+
+ return __CIOBUF__.parms[0] + __CIOBUF__.parms[1] * 256;
+}
+
+