Fixes so we don't use any of the standard include paths

This commit is contained in:
Ronald G. Minnich 2000-10-17 22:58:51 +00:00
commit 787deb4ae4
10 changed files with 40 additions and 53 deletions

View file

@ -97,7 +97,7 @@ __OUTS(b)
__OUTS(w)
__OUTS(l)
#ifdef __KERNEL__
#ifdef NONONONONO
#include <linux/vmalloc.h>
#include <asm/page.h>

View file

@ -224,7 +224,7 @@ extern void printf(char *format, ...);
#define PCI_FUNC(devfn) ((devfn) & 0x07)
#include <linux/types.h>
#include <types.h>
/*
* There is one pci_dev structure for each slot-number/function-number
@ -314,23 +314,23 @@ void pcibios_fixup(void);
void pcibios_fixup_bus(struct pci_bus *);
char *pcibios_setup (char *str);
int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char *val);
unsigned char where, u8 *val);
int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short *val);
unsigned char where, u16 *val);
int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int *val);
unsigned char where, u32 *val);
int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char val);
unsigned char where, u8 val);
int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short val);
unsigned char where, u16 val);
int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int val);
unsigned char where, u32 val);
int pcibios_debugwrite_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char val);
unsigned char where, u8 val);
int pcibios_debugwrite_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short val);
unsigned char where, u16 val);
int pcibios_debugwrite_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int val);
unsigned char where, u32 val);
/* Don't use these in new code, use pci_find_... instead */
@ -376,35 +376,6 @@ void pci_enable(void);
void intel_conf_writeb(unsigned long port, unsigned char value);
unsigned char intel_conf_readb(unsigned long port);
#ifndef CONFIG_PCI
/* If the system does not have PCI, clearly these return errors. Define
these as simple inline functions to avoid hair in drivers. */
extern inline int pcibios_present(void) { return 0; }
#define _PCI_NOP(o,s,t) \
extern inline int pcibios_##o##_config_##s## (u8 bus, u8 dfn, u8 where, t val) \
{ return PCIBIOS_FUNC_NOT_SUPPORTED; } \
extern inline int pci_##o##_config_##s## (struct pci_dev *dev, u8 where, t val) \
{ return PCIBIOS_FUNC_NOT_SUPPORTED; }
#define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \
_PCI_NOP(o,word,u16 x) \
_PCI_NOP(o,dword,u32 x)
_PCI_NOP_ALL(read, *)
_PCI_NOP_ALL(write,)
extern inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, struct pci_dev *from)
{ return NULL; }
extern inline struct pci_dev *pci_find_class(unsigned int class, struct pci_dev *from)
{ return NULL; }
extern inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn)
{ return NULL; }
extern inline void pci_set_master(struct pci_dev *dev)
{ return; }
#endif /* !CONFIG_PCI */
#define kmalloc(x, y) malloc(x)
void *malloc(unsigned int);

13
src/include/string.h Normal file
View file

@ -0,0 +1,13 @@
// yes, linux has fancy ones. We don't care. This stuff gets used
// hardly at all. And the pain of including those files is just too high.
//extern inline void strcpy(char *dst, char *src) {while (*src) *dst++ = *src++;}
//extern inline int strlen(char *src) { int i = 0; while (*src++) i++; return i;}
extern inline int strnlen(const char *src, int max) {
int i = 0;
while ((*src++) && (i < max))
i++;
return i;
}

View file

@ -35,7 +35,7 @@ void intel_set_mtrr(unsigned long rambase, unsigned long ramsizeK);
#ifdef NEWPCI /* IRQ routing stuff */
#include <lbpci.h>
#include <pci.h>
#include <pci-i386.h>
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))