aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gen-soccon.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2005-06-16 11:00:13 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-06-16 11:00:13 +0200
commit84fdd8a35ecef52e58198b55ac169e9f921ecd7f (patch)
treea805cdf58bf82e42b382e600607214a93b0ebbf1 /gcc/ada/gen-soccon.c
parent0453ca3d7288b11830065c9ed05ee3a75dc974da (diff)
downloadgcc-84fdd8a35ecef52e58198b55ac169e9f921ecd7f.zip
gcc-84fdd8a35ecef52e58198b55ac169e9f921ecd7f.tar.gz
gcc-84fdd8a35ecef52e58198b55ac169e9f921ecd7f.tar.bz2
[multiple changes]
2005-06-10 Arnaud Charlet <charlet@adacore.com> * Makefile.in: Add initialize.o when needed. Adapt to new VMS package body Symbols and subunits No specialized version of a-sytaco is needed for VxWorks. * a-wichun.ads, a-wichun.adb, a-zchuni.ads, a-zchuni.adb: New files. * a-zchara.ads, a-widcha.ads: New files. * system-hpux-ia64.ads: New file. * i-vxwork-x86.ads, i-vxwork.ads (intContext): Add this function which is imported from the VxWorks kernel. 2005-06-14 Robert Dewar <dewar@adacore.com> * g-soliop-mingw.ads, g-soccon-vms.adb, a-swmwco.ads, exp_smem.adb, fmap.adb, a-szmzco.ads, s-traent-vms.adb, s-traent-vms.ads, a-direio.ads, a-exctra.ads, a-exexda.adb, a-exextr.adb, a-stream.ads, s-restri.ads, s-restri.adb, s-traent.adb, s-traent.ads, a-slcain.adb, a-stzhas.ads, a-tiinau.adb, comperr.adb, exp_ch11.adb, g-boubuf.adb, g-calend.adb, g-debpoo.ads, g-moreex.ads, gprep.adb, g-regpat.ads, i-cexten.ads, i-os2thr.ads, makeutl.ads, memroot.adb, mlib-prj.adb, namet.adb, namet.ads, prj-makr.adb, prj-proc.adb, sem_dist.adb, sem_elim.ads, s-valint.adb, s-vallli.adb, s-vallli.adb, s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads, scn.adb, s-tasinf.adb, targparm.adb, uname.adb, uname.ads, xnmake.adb, xsinfo.adb, a-direct.ads: Remove extra blank lines. Minor reformatting. 2005-06-14 Thomas Quinot <quinot@adacore.com> * xeinfo.adb: Fix typo in comment 2005-06-14 Javier Miranda <miranda@adacore.com> * repinfo.ads: Fix typo in comment 2005-06-14 Gary Dismukes <dismukes@adacore.com> * s-finimp.adb (Parent_Tag): Delete this imported function (function Parent_Tag is now in the visible part of Ada.Tags). (Get_Deep_Controller): Call Ada.Tags.Parent_Tag directly instead of using imported function. 2005-06-14 Bernard Banner <banner@adacore.com> * vxaddr2line.adb: Add support for Windows hosted x86 vxworks. Should also apply for handling support for VxSim 653. 2005-06-14 Eric Botcazou <ebotcazou@adacore.com> * xsnames.adb: Add automatic generation of snames.h. 2005-06-14 Thomas Quinot <quinot@adacore.com> * gen-soccon.c: Add IP_MULTICAST_IF constant Minor reformatting and adjustments to prevent warnings. 2005-06-14 Pascal Obry <obry@adacore.com> * seh_init.c: Do not include <sys/stat.h>. This is not needed. From-SVN: r101072
Diffstat (limited to 'gcc/ada/gen-soccon.c')
-rw-r--r--gcc/ada/gen-soccon.c52
1 files changed, 33 insertions, 19 deletions
diff --git a/gcc/ada/gen-soccon.c b/gcc/ada/gen-soccon.c
index de63816..04dfccf 100644
--- a/gcc/ada/gen-soccon.c
+++ b/gcc/ada/gen-soccon.c
@@ -4,7 +4,7 @@
** **
** G E N - S O C C O N **
** **
-** Copyright (C) 2004 Free Software Foundation, Inc. **
+** Copyright (C) 2004-2005 Free Software Foundation, Inc. **
** **
** GNAT is free software; you can redistribute it and/or modify it under **
** terms of the GNU General Public License as published by the Free Soft- **
@@ -27,11 +27,16 @@
#include <stdio.h>
#include <string.h>
-#include "socket.h"
+#include "gsocket.h"
+
+#ifdef __MINGW32__
+#include <winsock2.h>
+#else
#include <netinet/in.h>
#include <netinet/tcp.h>
-#include <sys/filio.h>
+#include <sys/ioctl.h>
#include <netdb.h>
+#endif
struct line {
char *text;
@@ -48,8 +53,8 @@ struct line *first = NULL, *last = NULL;
#define _NL TXT("")
/* Empty line */
-#define itoad(n) itoa ("%d", n)
-#define itoax(n) itoa ("16#%08x#", n)
+#define itoad(n) f_itoa ("%d", n)
+#define itoax(n) f_itoa ("16#%08x#", n)
#define CND(name,comment) add_line(#name, itoad (name), comment);
/* Constant (decimal) */
@@ -63,12 +68,13 @@ struct line *first = NULL, *last = NULL;
void output (void);
/* Generate output spec */
-char *itoa (char *, int);
+char *f_itoa (char *, int);
/* int to string */
void add_line (char *, char*, char*);
-void main (void) {
+int
+main (void) {
TXT("------------------------------------------------------------------------------")
TXT("-- --")
@@ -78,7 +84,7 @@ TXT("-- G N A T . S O C K E T S . C O N S T A N T S
TXT("-- --")
TXT("-- S p e c --")
TXT("-- --")
-TXT("-- Copyright (C) 2000-2004 Free Software Foundation, Inc. --")
+TXT("-- Copyright (C) 2000-2005 Free Software Foundation, Inc. --")
TXT("-- --")
TXT("-- GNAT is free software; you can redistribute it and/or modify it under --")
TXT("-- terms of the GNU General Public License as published by the Free Soft- --")
@@ -507,15 +513,10 @@ CND(SO_ERROR, "Get/clear error status")
#endif
CND(SO_BROADCAST, "Can send broadcast msgs")
-#ifndef IP_ADD_MEMBERSHIP
-#define IP_ADD_MEMBERSHIP -1
-#endif
-CND(IP_ADD_MEMBERSHIP, "Join a multicast group")
-
-#ifndef IP_DROP_MEMBERSHIP
-#define IP_DROP_MEMBERSHIP -1
+#ifndef IP_MULTICAST_IF
+#define IP_MULTICAST_IF -1
#endif
-CND(IP_DROP_MEMBERSHIP, "Leave a multicast group")
+CND(IP_MULTICAST_IF, "Set/get mcast interface")
#ifndef IP_MULTICAST_TTL
#define IP_MULTICAST_TTL -1
@@ -526,10 +527,22 @@ CND(IP_MULTICAST_TTL, "Set/get multicast TTL")
#define IP_MULTICAST_LOOP -1
#endif
CND(IP_MULTICAST_LOOP, "Set/get mcast loopback")
+
+#ifndef IP_ADD_MEMBERSHIP
+#define IP_ADD_MEMBERSHIP -1
+#endif
+CND(IP_ADD_MEMBERSHIP, "Join a multicast group")
+
+#ifndef IP_DROP_MEMBERSHIP
+#define IP_DROP_MEMBERSHIP -1
+#endif
+CND(IP_DROP_MEMBERSHIP, "Leave a multicast group")
+
_NL
TXT("end GNAT.Sockets.Constants;")
-output ();
+ output ();
+ return 0;
}
void
@@ -563,13 +576,14 @@ output (void) {
}
char *
-itoa (char *fmt, int n) {
+f_itoa (char *fmt, int n) {
char buf[32];
sprintf (buf, fmt, n);
return strdup (buf);
}
-void add_line (char *_text, char *_value, char *_comment) {
+void
+add_line (char *_text, char *_value, char *_comment) {
struct line *l = (struct line *) malloc (sizeof (struct line));
l->text = _text;
l->value = _value;