StdLib: Change the last argument of the ioctl helper functions to va_list* from void*.

Functions which call these helper functions always pass the last parameter as a va_list argument.
Add a conditional block around a MSFT-only pragma so that stringlist.c will compile with GCC.
Comment-out the Socket Library components within StdLib.dsc.  These components are still in development.

Signed-off-by: darylm503
Reviewed by:   geekboy15A

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12369 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
darylm503 2011-09-16 23:16:56 +00:00
parent c614ca505d
commit 76beedc09c
6 changed files with 68 additions and 63 deletions

View File

@ -26,6 +26,7 @@
#include <errno.h>
#include <wctype.h>
#include <wchar.h>
#include <stdarg.h>
#include <sys/fcntl.h>
#include <kfile.h>
#include <Device/Device.h>
@ -377,7 +378,7 @@ EFIAPI
da_ConIoctl(
struct __filedes *filp,
ULONGN cmd,
void *argp
va_list argp
)
{
return -EPERM;

View File

@ -26,6 +26,7 @@
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <wctype.h>
#include <wchar.h>
#include <sys/fcntl.h>
@ -319,7 +320,7 @@ EFIAPI
da_ShellIoctl(
struct __filedes *filp,
ULONGN cmd,
void *argp ///< May be a pointer or a value
va_list argp
)
{
return -EPERM;

View File

@ -17,6 +17,7 @@
#include <LibConfig.h>
#include <errno.h>
#include <stdarg.h>
#include <sys/poll.h>
#include <kfile.h>
#include <Device/Device.h>
@ -45,7 +46,7 @@ int EFIAPI fnullop_flush (struct __filedes *filp)
int EFIAPI fbadop_stat (struct __filedes *filp, struct stat *StatBuf, void *Buf)
{ return -EPERM; }
int EFIAPI fbadop_ioctl (struct __filedes *filp, ULONGN Cmd, void *argp)
int EFIAPI fbadop_ioctl (struct __filedes *filp, ULONGN Cmd, va_list argp)
{ return -EPERM; }
int EFIAPI fbadop_delete (struct __filedes *filp)

View File

@ -27,8 +27,9 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#if defined(_MSC_VER) /* Handle Microsoft VC++ compiler specifics. */
#pragma warning ( disable : 4018 )
#endif
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)

View File

@ -120,9 +120,9 @@
StdLib/PosixLib/Stringlist/LibStringlist.inf
# Socket Libraries - LibC based
StdLib/BsdSocketLib/BsdSocketLib.inf
StdLib/EfiSocketLib/EfiSocketLib.inf
StdLib/UseSocketDxe/UseSocketDxe.inf
# StdLib/BsdSocketLib/BsdSocketLib.inf
# StdLib/EfiSocketLib/EfiSocketLib.inf
# StdLib/UseSocketDxe/UseSocketDxe.inf
##############################################################################
#

View File

@ -48,6 +48,7 @@
#include <Protocol/SimpleFileSystem.h>
#include <wchar.h>
#include <stdarg.h>
#include <sys/fcntl.h>
#include <sys/unistd.h>
@ -104,7 +105,7 @@ struct fileops {
/* Call the fbadop_* version of these functions if not implemented by the device. */
int (EFIAPI *fo_stat) (struct __filedes *filp, struct stat *StatBuf, void *Buf);
int (EFIAPI *fo_ioctl) (struct __filedes *filp, ULONGN Cmd, void *argp);
int (EFIAPI *fo_ioctl) (struct __filedes *filp, ULONGN Cmd, va_list argp);
int (EFIAPI *fo_delete) (struct __filedes *filp);
int (EFIAPI *fo_rmdir) (struct __filedes *filp);
int (EFIAPI *fo_mkdir) (const char *path, __mode_t perms);
@ -159,7 +160,7 @@ short EFIAPI fnullop_poll (struct __filedes *filp, short Events);
int EFIAPI fnullop_flush (struct __filedes *filp);
int EFIAPI fbadop_stat (struct __filedes *filp, struct stat *StatBuf, void *Buf);
int EFIAPI fbadop_ioctl (struct __filedes *filp, ULONGN Cmd, void *argp);
int EFIAPI fbadop_ioctl (struct __filedes *filp, ULONGN Cmd, va_list argp);
int EFIAPI fbadop_delete (struct __filedes *filp);
int EFIAPI fbadop_rmdir (struct __filedes *filp);
int EFIAPI fbadop_mkdir (const char *path, __mode_t perms);