diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-05-01 10:11:58 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-05-01 10:11:58 +0100 |
commit | 3ea1c17457e36339e9f03b4e04bd31931269f1af (patch) | |
tree | 277eefdbc605d509f383020420388d3002318793 /extras/mini-os/include/lib-gpl.h | |
parent | 6f9d5eaa91fb717c9e435231a1dbb17e999457a0 (diff) | |
download | xen-3ea1c17457e36339e9f03b4e04bd31931269f1af.tar.gz xen-3ea1c17457e36339e9f03b4e04bd31931269f1af.tar.bz2 xen-3ea1c17457e36339e9f03b4e04bd31931269f1af.zip |
mini-os: fix lib.h licence
Update the Linux stdio functions prototypes, and move them to a
separate header, licenced under GPL2+. Import FreeBSD8 string
functions prototypes, update licence. Drop kvec, of unsure source and
useless anyway.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'extras/mini-os/include/lib-gpl.h')
-rw-r--r-- | extras/mini-os/include/lib-gpl.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/extras/mini-os/include/lib-gpl.h b/extras/mini-os/include/lib-gpl.h new file mode 100644 index 0000000000..d5602b2034 --- /dev/null +++ b/extras/mini-os/include/lib-gpl.h @@ -0,0 +1,59 @@ +/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*- + **************************************************************************** + * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge + **************************************************************************** + * + * File: lib.h + * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk) + * Changes: + * + * Date: Aug 2003 + * + * Environment: Xen Minimal OS + * Description: Random useful library functions, from Linux' + * include/linux/kernel.h + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _LIB_GPL_H_ +#define _LIB_GPL_H_ + +#ifndef HAVE_LIBC +/* printing */ +extern unsigned long simple_strtoul(const char *,char **,unsigned int); +extern long simple_strtol(const char *,char **,unsigned int); +extern unsigned long long simple_strtoull(const char *,char **,unsigned int); +extern long long simple_strtoll(const char *,char **,unsigned int); + +extern int sprintf(char * buf, const char * fmt, ...) + __attribute__ ((format (printf, 2, 3))); +extern int vsprintf(char *buf, const char *, va_list) + __attribute__ ((format (printf, 2, 0))); +extern int snprintf(char * buf, size_t size, const char * fmt, ...) + __attribute__ ((format (printf, 3, 4))); +extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); +extern int scnprintf(char * buf, size_t size, const char * fmt, ...) + __attribute__ ((format (printf, 3, 4))); +extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); +extern int sscanf(const char *, const char *, ...) + __attribute__ ((format (scanf, 2, 3))); +extern int vsscanf(const char *, const char *, va_list) + __attribute__ ((format (scanf, 2, 0))); +#endif + +#endif /* _LIB_GPL_H_ */ |