KINGx - Das inoffizielle PlayStation Forum & News Portal

Normale Version: stdarg.h existiert nicht?
Sie sehen gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hey ich bins nochmal Sad
Ich habe schon ins pspsdk/psp/sdk/include und pspsdk/psp/sdk/include/libc/ gesucht, aber kann die stdarg.h Header Datei einfach nicht finden Sad
Habe PSPMinGW installiert und nicht cygwin.

Weiß jemand von wo man die Datei runterladen kann, kann nichts finden. Oder wäre einer mal so lieb und könnte seine stdarg.h Datei uppen Sad

Fly Destination
Google spuckt das zur ersten Seite:

PHP-Code:
/*
 * stdarg.h
 *
 * Provides facilities for stepping through a list of function arguments of
 * an unknown number and type.
 *
 * NOTE: Gcc should provide stdarg.h, and I believe their version will work
 *       with crtdll. If necessary I think you can replace this with the GCC
 *       stdarg.h (or is it vararg.h).
 *
 * Note that the type used in va_arg is supposed to match the actual type
 * *after default promotions*. Thus, va_arg (..., short) is not valid.
 *
 * This file is part of the Mingw32 package.
 *
 * Contributors:
 *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
 *
 *  THIS SOFTWARE IS NOT COPYRIGHTED
 *
 *  This source code is offered for use in the public domain. You may
 *  use, modify or distribute it freely.
 *
 *  This code is distributed in the hope that it will be useful but
 *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
 *  DISCLAMED. This includes but is not limited to warranties of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * $Revision: 1.1.1.1 $
 * $Author: brandon6684 $
 * $Date: 2001/12/18 22:53:51 $
 *
 */
/* Appropriated for Reactos Crtdll by Ariadne */

#ifndef _STDARG_H_
#define _STDARG_H_

/*
 * Don't do any of this stuff for the resource compiler.
 */
#ifndef RC_INVOKED

/* 
 * I was told that Win NT likes this.
 */
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
#endif

#ifndef    _VA_LIST
#define _VA_LIST
typedef charva_list;
#endif


/*
 * Amount of space required in an argument list (ie. the stack) for an
 * argument of type t.
 */
#define __va_argsiz(t)    \
    
(((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))


/*
 * Start variable argument list processing by setting AP to point to the
 * argument after pN.
 */
#ifdef    __GNUC__
/*
 * In GNU the stack is not necessarily arranged very neatly in order to
 * pack shorts and such into a smaller argument list. Fortunately a
 * neatly arranged version is available through the use of __builtin_next_arg.
 */
#define va_start(ap, pN)    \
    
((ap) = ((va_list__builtin_next_arg(pN)))
#else
/*
 * For a simple minded compiler this should work (it works in GNU too for
 * vararg lists that don't follow shorts and such).
 */
#define va_start(ap, pN)    \
    
((ap) = ((va_list) (&amp;pN) + __va_argsiz(pN)))
#endif


/*
 * End processing of variable argument list. In this case we do nothing.
 */
#define va_end(ap)    ((void)0)


/*
 * Increment ap to the next argument in the list while returing a
 * pointer to what ap pointed to first, which is of type t.
 *
 * We cast to void* and then to t* because this avoids a warning about
 * increasing the alignment requirement.
 */

#define va_arg(ap, t)                    \
     
(((ap) = (ap) + __va_argsiz(t)),        \
      *((
t*) (void*) ((ap) - __va_argsiz(t))))

#endif /* Not RC_INVOKED */

#endif /* not _STDARG_H_ */ 

Unbekannt :
Google spuckt das zur ersten Seite:

PHP-Code:
/*
 * stdarg.h
 *
 * Provides facilities for stepping through a list of function arguments of
 * an unknown number and type.
 *
 * NOTE: Gcc should provide stdarg.h, and I believe their version will work
 *       with crtdll. If necessary I think you can replace this with the GCC
 *       stdarg.h (or is it vararg.h).
 *
 * Note that the type used in va_arg is supposed to match the actual type
 * *after default promotions*. Thus, va_arg (..., short) is not valid.
 *
 * This file is part of the Mingw32 package.
 *
 * Contributors:
 *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
 *
 *  THIS SOFTWARE IS NOT COPYRIGHTED
 *
 *  This source code is offered for use in the public domain. You may
 *  use, modify or distribute it freely.
 *
 *  This code is distributed in the hope that it will be useful but
 *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
 *  DISCLAMED. This includes but is not limited to warranties of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * $Revision: 1.1.1.1 $
 * $Author: brandon6684 $
 * $Date: 2001/12/18 22:53:51 $
 *
 */
/* Appropriated for Reactos Crtdll by Ariadne */

#ifndef _STDARG_H_
#define _STDARG_H_

/*
 * Don't do any of this stuff for the resource compiler.
 */
#ifndef RC_INVOKED

/* 
 * I was told that Win NT likes this.
 */
#ifndef _VA_LIST_DEFINED
#define _VA_LIST_DEFINED
#endif

#ifndef    _VA_LIST
#define _VA_LIST
typedef charva_list;
#endif


/*
 * Amount of space required in an argument list (ie. the stack) for an
 * argument of type t.
 */
#define __va_argsiz(t)    \
    
(((sizeof(t) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))


/*
 * Start variable argument list processing by setting AP to point to the
 * argument after pN.
 */
#ifdef    __GNUC__
/*
 * In GNU the stack is not necessarily arranged very neatly in order to
 * pack shorts and such into a smaller argument list. Fortunately a
 * neatly arranged version is available through the use of __builtin_next_arg.
 */
#define va_start(ap, pN)    \
    
((ap) = ((va_list__builtin_next_arg(pN)))
#else
/*
 * For a simple minded compiler this should work (it works in GNU too for
 * vararg lists that don't follow shorts and such).
 */
#define va_start(ap, pN)    \
    
((ap) = ((va_list) (&amp;pN) + __va_argsiz(pN)))
#endif


/*
 * End processing of variable argument list. In this case we do nothing.
 */
#define va_end(ap)    ((void)0)


/*
 * Increment ap to the next argument in the list while returing a
 * pointer to what ap pointed to first, which is of type t.
 *
 * We cast to void* and then to t* because this avoids a warning about
 * increasing the alignment requirement.
 */

#define va_arg(ap, t)                    \
     
(((ap) = (ap) + __va_argsiz(t)),        \
      *((
t*) (void*) ((ap) - __va_argsiz(t))))

#endif /* Not RC_INVOKED */

#endif /* not _STDARG_H_ */ 



Ja, dass hatte ich auch schon gefunden, aber das ist doch für den PC oder? Sind die Header Dateien bei der PSP nicht etwas anders, oder irre ich mich da?

Fly Destination

Es gibt zwar spezielle header für die psp, aber das ist eine standard library, die auch die psp nutzt.
Lies dir erstmal Tutorials durch, bevor Du was coden willst. Wenn man sich mit Datentypen nicht auskennt, öffnet man das Buch und liest das Kapitel darüber.

Edit:

Unten beschrieben

-blue7 :
Es gibt zwar spezielle header für die psp, aber das ist eine standard library, die auch die psp nutzt.


Okay danke, kann geclosed werden Smile

Unbekannt :
Lies dir erstmal Tutorials durch, bevor Du was coden willst. Wenn man sich mit Datentypen nicht auskennt, öffnet man das Buch und liest das Kapitel darüber.

Mit deiner Aussage hast du dich schon selber disqualifiziert. stdarg hat gar nicht mit Datentypen zu tun. Es dient nur dazu Funktionen zu erstellen mit unterschiedlich vielen Parametern. Dass du keine Ahnung davon hast ist klar.

Bei mir kann ich den Header ganz einfach über <stdarg.h> einbinden (MinGWPSP), kommt bei dir eine Fehlermeldung ?

pspbricker :

Unbekannt :
Lies dir erstmal Tutorials durch, bevor Du was coden willst. Wenn man sich mit Datentypen nicht auskennt, öffnet man das Buch und liest das Kapitel darüber.

Mit deiner Aussage hast du dich schon selber disqualifiziert. stdarg hat gar nicht mit Datentypen zu tun. Es dient nur dazu Funktionen zu erstellen mit unterschiedlich vielen Parametern. Dass du keine Ahnung davon hast ist klar.

Bei mir kann ich den Header ganz einfach über <stdarg.h> einbinden (MinGWPSP), kommt bei dir eine Fehlermeldung ?


-.-

Vorher schrieb er ein Thema über Datentypen, wo er fragte was u32 sei.
Ich meinte damit, wenn er groß anfangen will, sollte er besser nochmal die Datentypen kennen, dass ist nämlich Grundkurs C.

Hey pspbricker,
danke für deine Antwort.

Ja, es kommen leider Fehler Sad
zum Beispiel:



Zitat:
-.-

Vorher schrieb er ein Thema über Datentypen, wo er fragte was u32 sei.
Ich meinte damit, wenn er groß anfangen will, sollte er besser nochmal die Datentypen kennen, dass ist nämlich Grundkurs C.


Ich kenne die Datentypen in C, aber ich bin in keinem der Bücher die ich gelesen habe dem Schlüsselwort u32 begegenet. Es wurde immer als unsigned int dargestellt. Und wenn man in Google nach u32 sucht, kommt auch nur ein Haufen uninformativer Müll raus. Und jetzt hör bitte auf zu spammen und wenn du nichts zum Thema schreiben kannst, dann schreib einfach nichts Wink

Fly Destination

Vorher,aber vielleicht kennt der es jetzt ? -.-
Also brauchst du nciht zumeckern !

mfg

Fly Destination :
Hey pspbricker,
danke für deine Antwort.

Ja, es kommen leider Fehler Sad
zum Beispiel:


Schreib den Code mal hier, die Syntax stimm nicht.

Edit:

Zitat:
Ich kenne die Datentypen in C, aber ich bin in keinem der Bücher die ich gelesen habe dem Schlüsselwort u32 begegenet. Es wurde immer als unsigned int dargestellt. Und wenn man in Google nach u32 sucht, kommt auch nur ein Haufen uninformativer Müll raus. Und jetzt hör bitte auf zu spammen und wenn du nichts zum Thema schreiben kannst, dann schreib einfach nichts

Fly Destination


Upps das war Notepass wo das geschrieben hat "Was ist das". Hab mir einen falschen Eindruck gemacht, sorry^^.

Double Edit:

An der Header-File liegt es sicherlich nicht, Line 2 ist Kommentar.

Bei ist das stdarg.h ein Durcheinander von Datein, die sie Gegenseitig einbinden. Welche Version von MinGWPSP hast du installiert ?
Ja,also musst du ihn nciht direkt anmeckern !

mfg
Danke Unbekannt, lag wirklich am Kommentar. Ich Doofi habe den Code falsch kopiert und das "/*" am Anfang nicht mitkopiert.
Aber der Compiler spuckt immernoch Fehler aus:



Wenn ich richtig gezählt habe, ist Zeile 103 folgende:

Code:
*((t*) (void*) ((ap) - __va_argsiz(t))))


EDIT:

@pspbricker: Habe Version 0.10, was meines Wissens nach die neueste Version ist.

Fly Destination

Nimm' die im Anhang. Einfach die zip entpacken Wink
Seiten: 1 2
Referenz-URLs