diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/bits/ipc.h uClinux-coldfire/lib/libc/include/bits/ipc.h *** tmp/uClinux-coldfire/lib/libc/include/bits/ipc.h Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/include/bits/ipc.h Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,71 ---- + /* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef _SYS_IPC_H + # error "Never use directly; include instead." + #endif + + #include + + /* Mode bits for `msgget', `semget', and `shmget'. */ + #define IPC_CREAT 01000 /* Create key if key does not exist. */ + #define IPC_EXCL 02000 /* Fail if key exists. */ + #define IPC_NOWAIT 04000 /* Return error on wait. */ + + /* Control commands for `msgctl', `semctl', and `shmctl'. */ + #define IPC_RMID 0 /* Remove identifier. */ + #define IPC_SET 1 /* Set `ipc_perm' options. */ + #define IPC_STAT 2 /* Get `ipc_perm' options. */ + #ifdef __USE_GNU + # define IPC_INFO 3 /* See ipcs. */ + #endif + + /* Special key values. */ + #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + + /* Data structure used to pass permission information to IPC operations. */ + struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned short int uid; /* Owner's user ID. */ + unsigned short int gid; /* Owner's group ID. */ + unsigned short int cuid; /* Creator's user ID. */ + unsigned short int cgid; /* Creator's group ID. */ + unsigned short int mode; /* Read/write permission. */ + unsigned short int seq; /* Sequence number. */ + }; + + __BEGIN_DECLS + + extern int ipc __P (( int __call, int __first, int __second, int __third, void *__ptr )); + + __END_DECLS + + #define SEMOP 1 + #define SEMGET 2 + #define SEMCTL 3 + #define MSGSND 11 + #define MSGRCV 12 + #define MSGGET 13 + #define MSGCTL 14 + #define SHMAT 21 + #define SHMDT 22 + #define SHMGET 23 + #define SHMCTL 24 + diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/bits/msq.h uClinux-coldfire/lib/libc/include/bits/msq.h *** tmp/uClinux-coldfire/lib/libc/include/bits/msq.h Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/include/bits/msq.h Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,74 ---- + /* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef _SYS_MSG_H + # error "Never use directly; include instead." + #endif + + /* Define options for message queue functions. */ + #define MSG_NOERROR 010000 /* no error if message is too big */ + #ifdef __USE_GNU + # define MSG_EXCEPT 020000 /* recv any msg except of specified type */ + #endif + + /* Types used in the structure definition. */ + typedef unsigned short int msgqnum_t; + typedef unsigned short int msglen_t; + + + /* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ + struct msqid_ds + { + struct ipc_perm msg_perm; /* structure describing operation permission */ + struct msg *msg_first; /* pointer to first message on queue */ + struct msg *msg_last; /* pointer to last message on queue */ + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + struct wait_queue *wwait; /* ??? */ + struct wait_queue *rwait; /* ??? */ + unsigned short int msg_cbytes;/* current number of bytes on queue */ + unsigned short int msg_qnum; /* number of messages currently on queue */ + unsigned short int msg_qbytes;/* max number of bytes allowed on queue */ + unsigned short int msg_lspid; /* pid of last msgsnd() */ + unsigned short int msg_lrpid; /* pid of last msgrcv() */ + }; + + #ifdef __USE_MISC + + # define msg_cbytes __msg_cbytes + + /* ipcs ctl commands */ + # define MSG_STAT 11 + # define MSG_INFO 12 + + /* buffer for msgctl calls IPC_INFO, MSG_INFO */ + struct msginfo + { + int msgpool; + int msgmap; + int msgmax; + int msgmnb; + int msgmni; + int msgssz; + int msgtql; + unsigned short int msgseg; + }; + + #endif /* __USE_MISC */ diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/bits/types.h uClinux-coldfire/lib/libc/include/bits/types.h *** tmp/uClinux-coldfire/lib/libc/include/bits/types.h Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/include/bits/types.h Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,29 ---- + /* Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef _BITS_TYPES_H + #define _BITS_TYPES_H 1 + + #include + + #define __need_size_t + #include + + typedef int __key_t; + + #endif diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/stdio.h uClinux-coldfire/lib/libc/include/stdio.h *** tmp/uClinux-coldfire/lib/libc/include/stdio.h Mon May 28 20:24:50 2001 --- uClinux-coldfire/lib/libc/include/stdio.h Wed Jun 27 11:43:27 2001 *************** *** 1,4 **** - #ifndef __STDIO_H #define __STDIO_H --- 1,3 ---- *************** *** 7,12 **** --- 6,13 ---- __BEGIN_DECLS + #include + #ifndef SEEK_SET #define SEEK_SET 0 #define SEEK_CUR 1 *************** *** 116,122 **** --- 117,125 ---- extern int printf __P ((__const char*, ...)); extern int fprintf __P ((FILE*, __const char*, ...)); extern int sprintf __P ((char*, __const char*, ...)); + extern int vsprintf __P ((char*, __const char*, va_list)); extern int fscanf __P ((FILE*, __const char*, ...)); + extern int sscanf __P ((__const char *, __const char *, ...)); extern int ungetc __P ((int c, FILE * stream)); diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/sys/ipc.h uClinux-coldfire/lib/libc/include/sys/ipc.h *** tmp/uClinux-coldfire/lib/libc/include/sys/ipc.h Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/include/sys/ipc.h Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,40 ---- + /* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef _SYS_IPC_H + #define _SYS_IPC_H 1 + + #include + #include + + /* Get system dependent definition of `struct ipc_perm' and more. */ + #include + + #ifndef key_t + typedef __key_t key_t; + # define key_t key_t + #endif + + __BEGIN_DECLS + + /* Generates key for System V style IPC. */ + extern key_t ftok __P ((__const char *__pathname, int __proj_id)); + + __END_DECLS + + #endif /* sys/ipc.h */ diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/sys/msg.h uClinux-coldfire/lib/libc/include/sys/msg.h *** tmp/uClinux-coldfire/lib/libc/include/sys/msg.h Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/include/sys/msg.h Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,64 ---- + /* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + + #ifndef _SYS_MSG_H + #define _SYS_MSG_H + + #include + #include + + /* Get common definition of System V style IPC. */ + #include + + /* Get system dependent definition of `struct msqid_ds' and more. */ + #include + + /* Define types required by the standard. */ + #define __need_time_t + #include + + /* The following System V style IPC functions implement a message queue + system. The definition is found in XPG2. */ + + /* Template for struct to be used as argument for `msgsnd' and `msgrcv'. */ + struct msgbuf + { + long int mtype; /* type of received/sent message */ + char mtext[1]; /* text of the message */ + }; + + + __BEGIN_DECLS + + /* Message queue control operation. */ + extern int msgctl __P ((int __msqid, int __cmd, struct msqid_ds *__buf)); + + /* Get messages queue. */ + extern int msgget __P ((key_t __key, int __msgflg)); + + /* Receive message from message queue. */ + extern int msgrcv __P ((int __msqid, struct msgbuf *__msgp, size_t __msgsz, + long int __msgtyp, int __msgflg)); + + /* Send message to message queue. */ + extern int msgsnd __P ((int __msqid, __const struct msgbuf *__msgp, size_t __msgsz, + int __msgflg)); + + __END_DECLS + + #endif /* sys/msg.h */ diff -cr --new-file tmp/uClinux-coldfire/lib/libc/include/varargs.h uClinux-coldfire/lib/libc/include/varargs.h *** tmp/uClinux-coldfire/lib/libc/include/varargs.h Mon May 28 20:24:50 2001 --- uClinux-coldfire/lib/libc/include/varargs.h Wed Jun 27 12:30:55 2001 *************** *** 2,8 **** --- 2,15 ---- #ifndef __VARARGS_H #define __VARARGS_H + #ifndef __STDARG_H typedef char *va_list; + #endif + + #undef va_dcl + #undef va_start + #undef va_arg + #undef va_end #define va_dcl va_list va_alist; #define va_start(ap) ap = (va_list)&va_alist diff -cr --new-file tmp/uClinux-coldfire/lib/libc/stdio2/scanf.c uClinux-coldfire/lib/libc/stdio2/scanf.c *** tmp/uClinux-coldfire/lib/libc/stdio2/scanf.c Mon May 28 20:24:52 2001 --- uClinux-coldfire/lib/libc/stdio2/scanf.c Wed Jun 27 11:41:32 2001 *************** *** 30,39 **** #ifdef L_sscanf #ifdef __STDC__ ! int sscanf(char * sp, const char * fmt, ...) #else int sscanf(sp, fmt, va_alist) ! char * sp; __const char *fmt; va_dcl #endif --- 30,39 ---- #ifdef L_sscanf #ifdef __STDC__ ! int sscanf(const char * sp, const char * fmt, ...) #else int sscanf(sp, fmt, va_alist) ! __const char * sp; __const char *fmt; va_dcl #endif diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/clock.c uClinux-coldfire/lib/libc/sysdeps/clock.c *** tmp/uClinux-coldfire/lib/libc/sysdeps/clock.c Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/clock.c Wed Jun 27 11:39:15 2001 *************** *** 0 **** --- 1,7 ---- + #include + #include + + clock_t clock(void) + { + return times( 0 ); + } diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/ftime.c uClinux-coldfire/lib/libc/sysdeps/ftime.c *** tmp/uClinux-coldfire/lib/libc/sysdeps/ftime.c Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/ftime.c Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,17 ---- + #include + #include + + int + ftime( struct timeb * tp ) + { + int RetVal = 0; + struct timeval tv; + + if( !( RetVal = gettimeofday( &tv, 0 ) ) ) + { + tp->time = tv.tv_sec; + tp->millitm = tv.tv_usec / 1000; + } + + return RetVal; + } diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/ftok.S uClinux-coldfire/lib/libc/sysdeps/ftok.S *** tmp/uClinux-coldfire/lib/libc/sysdeps/ftok.S Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/ftok.S Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,22 ---- + /* Copyright (C) 1991, 1992 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, write to the Free Software Foundation, Inc., 675 Mass Ave, + Cambridge, MA 02139, USA. */ + + #include + + SYSCALL__ (ftok, 2) + ret diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/makefile.objs uClinux-coldfire/lib/libc/sysdeps/makefile.objs *** tmp/uClinux-coldfire/lib/libc/sysdeps/makefile.objs Mon May 28 20:24:54 2001 --- uClinux-coldfire/lib/libc/sysdeps/makefile.objs Wed Jun 27 11:39:15 2001 *************** *** 180,183 **** write.o \ m68k/ptrace.o \ brk.o \ ! sbrk.o --- 180,190 ---- write.o \ m68k/ptrace.o \ brk.o \ ! sbrk.o \ ! ftok.o \ ! msgctl.o \ ! msgget.o \ ! msgrcv.o \ ! msgsnd.o \ ! ftime.o \ ! clock.o diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/msgctl.c uClinux-coldfire/lib/libc/sysdeps/msgctl.c *** tmp/uClinux-coldfire/lib/libc/sysdeps/msgctl.c Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/msgctl.c Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,8 ---- + #include + #include + + int + msgctl ( int msqid, int cmd, struct msqid_ds *buf ) + { + return ipc( MSGCTL, msqid, cmd, 0, buf ); + } diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/msgget.c uClinux-coldfire/lib/libc/sysdeps/msgget.c *** tmp/uClinux-coldfire/lib/libc/sysdeps/msgget.c Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/msgget.c Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,8 ---- + #include + #include + + int + msgget ( key_t key, int msgflg ) + { + return ipc( MSGGET, key, msgflg, 0, 0 ); + } diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/msgrcv.c uClinux-coldfire/lib/libc/sysdeps/msgrcv.c *** tmp/uClinux-coldfire/lib/libc/sysdeps/msgrcv.c Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/msgrcv.c Wed Jun 27 11:30:24 2001 *************** *** 0 **** --- 1,18 ---- + #include + #include + + struct ipc_kludge + { + void * msgp; + long int msgtyp; + }; + + int + msgrcv ( int msqid, struct msgbuf *msgp, size_t msgsz, long int msgtyp, int msgflg ) + { + struct ipc_kludge tmp; + tmp.msgp = msgp; + tmp.msgtyp = msgtyp; + + return ipc( MSGRCV, msqid, (int)msgsz, msgflg, (void*)&tmp ); + } diff -cr --new-file tmp/uClinux-coldfire/lib/libc/sysdeps/msgsnd.c uClinux-coldfire/lib/libc/sysdeps/msgsnd.c *** tmp/uClinux-coldfire/lib/libc/sysdeps/msgsnd.c Wed Dec 31 17:00:00 1969 --- uClinux-coldfire/lib/libc/sysdeps/msgsnd.c Wed Jun 27 11:38:35 2001 *************** *** 0 **** --- 1,8 ---- + #include + #include + + int + msgsnd ( int msqid, const struct msgbuf *msgp, size_t msgsz, int msgflg ) + { + return ipc( MSGSND, msqid, msgsz, msgflg, (void*)msgp ); + } diff -cr --new-file tmp/uClinux-coldfire/lib/libm/scanf.c uClinux-coldfire/lib/libm/scanf.c *** tmp/uClinux-coldfire/lib/libm/scanf.c Mon May 28 20:25:12 2001 --- uClinux-coldfire/lib/libm/scanf.c Wed Jun 27 11:41:13 2001 *************** *** 30,39 **** #ifdef L_sscanf #ifdef __STDC__ ! int sscanf(char * sp, const char * fmt, ...) #else int sscanf(sp, fmt, va_alist) ! char * sp; __const char *fmt; va_dcl #endif --- 30,39 ---- #ifdef L_sscanf #ifdef __STDC__ ! int sscanf(const char * sp, const char * fmt, ...) #else int sscanf(sp, fmt, va_alist) ! __const char * sp; __const char *fmt; va_dcl #endif diff -cr --new-file tmp/uClinux-coldfire/user/arch/coldfire/build.mk uClinux-coldfire/user/arch/coldfire/build.mk *** tmp/uClinux-coldfire/user/arch/coldfire/build.mk Mon May 28 20:25:37 2001 --- uClinux-coldfire/user/arch/coldfire/build.mk Wed Jun 27 16:35:34 2001 *************** *** 55,61 **** LDFLAGS = $(CFLAGS) -Wl,-elf2flt # LDLIBS = $(LIBC) $(LIBGCC) LDLIBS = $(LIBC) ! CXXLIBS = $(LIBSTDCPP) $(LIBIOSTREAM) $(LIBIO) $(LIBIBERTY) $(LIBC) $(LIBGCC) FLTFLAGS := export FLTFLAGS --- 55,61 ---- LDFLAGS = $(CFLAGS) -Wl,-elf2flt # LDLIBS = $(LIBC) $(LIBGCC) LDLIBS = $(LIBC) ! CXXLIBS = $(LIBC) $(LIBIOSTREAM) $(LIBIBERTY) $(LIBGCC) $(LIBIO) $(LIBSTDCPP) $(LIBC) FLTFLAGS := export FLTFLAGS