Programming :: Conflicting Type Declarations Between Sys/types.h And Linux/types.h
Sep 12, 2010
I'm trying to use "netlink" to get ip address of a Linux box. But the linux/types.h included from "linux/rtnetlink.h" introduced many conflicting type declarations with "sys/types.h".
#include <rtnetlink.h>
#include <sys/types.h>
#include <sys/socket.h>
int main (int argc, char *argv[])
{
return 0;
}
I'm trying to compile a main.c file that contains a while statement. Embedded in the while statement are functions that are being called. After the while statement, I have 2 more functions being called, one to find the average(getaverage), and one to print the results (printstuff). I also used a header file (my.h) that contains all of the needed #define and #include, along with each of the void function() statements.
There isn't any problems with the while statement/ the functions in while, but when I try and compile main.c I get the following errors:
main.c error: conflicting types for 'getaverage' my.h error: previous declaration of 'getaverage' and then the same thing for 'printstuff'
I would like port 80 to have a small daemon running on it that detects HTTP traffic and sends a small redirect response, and any other traffic begins streaming data from my VPN daemon. I was wondering if this has already been made, or any kind of technology for detecting types of traffic and allowing you to run multiple types of servers on the same port.
I'm using Grsync and I want to be able to plug in any drive into my laptop and run rsync on it to back up all the user documents on there to another external hdd and to exclude everything else. Working on the principle that user documents don't always appear where we'd expect I want rsync to look through the whole drive and filter what it backs up by file type. I am only having partial success, however.
I am using the 'filter' option in the 'additional options' box. I am using the command Code: filter='merge /home/tim/Desktop/filter' and I am attaching the filter file I have written. (I have added the .txt extention to upload it).
I have tested this script on my home folder and here's what's going wrong. Rsync will copy the entire directory structure regardless of whether there are any files to be copied over in those directories. I am also getting only some file types getting included and not others. .odt and .ods files are copied, for instance, but not .doc or .rtf.
I installed a trial copy of Anquet Map V06 under Wine then decided to remove it. Afterwards I could find many remnants associated with the Anquet program which I've deleted. Except what remains is an association between my .gpx files with Anquet and that includes and any new gpx file I download. My interpretation is that during the install process an association has been created with the gpx file type and the Anquet map program. This is what I want to stop. If I download a .gpx file and look at it's properties I see- Type: GPX File -Anquet Mapsv06 (application/x-wine-extension-gpx) I found this file and it's contents-
Running "sudo update-mime-database /usr/share/mime" and rebooting didn't remove the association. How can I stop the Anquet name making as association with my gpx files?
What are the different types of API's in linux?How can we predict the kind of API we are using?And what are API layers related to?Are API's and system calls ,both are same?
I guess I'm just a noob, but I notice that some C libraries (and even some C++ ones) tend to redefine the basic types with their own naming convention.
For example, OpenGL redefines the basic types: Code: from GL/gl.h typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef signed char GLbyte; typedef short GLshort; typedef int GLint; [Code].....
I decided to try making a programming language again after my last unsuccessful attempt, so now I figured how to write a good AST and it works great when the nodes are hard-coded into a test program. But to make a language out of it, I need a parser to build the tree according to an input file. I ran into a problem here:
%token SEMICOLON INTEGER VARIABLE IF WHILE DO OPAREN CPAREN OBRACE CBRACE %right ASSIGN %left NE %left PLUS MINUS %left TIMES DIVIDE %% .....
As you might see, each nonterminal creates a Node* object and uses it as its value. The problem is that the literal tokens, however, don't return Node*'s and I don't know what to do. I would like to be able to convert literal tokens to nodes in the Lex file (which would avoid the problem), but the problem is with the assignment operator, which takes a Node* for the right-hand side and a variable name (not a Variable Node, because they just evaluate the the variable's value and you can't change the variable with them) for the left hand side.
I have functions which return different data like: int, char*, double...
I also have a list of datatypes (INTEGER, TEXT, REAL...) which can be returned.
I need to map a datatype with function, which purpose is to return it. Therefore, when I determine a datatype, I would like to call the required function without doing switch all the time.
I need to have a global variable PHP Code: volatile sig_atomic_t int Terminazione=0; but I get the error error: two or more data types in declaration specifier even if I have included signal.h.
Only ones I can think of seem overly complex, and I'm sure there is a simple solution I am overlooking. I have a class, it has a member who is an object. This object needs to be able to represent an object of different types.
[code]...
Where "surface" could be several different types, which will be set during execution. Hope this is clear enough. I have tried using templates but am getting "data member cannot be a member template". Either I have incorrect syntax, or am not implementing it right. another solution would have one class containing definitions of all possible shapes, But this would take up extra memory. Other solutions I thought of seem too round-about, and seems there is a simpler solution that I have overlooked.
I hope this is in the right spot. I need some help editing my .vimrc file. I want to edit it so that if I create a .cpp file, it will turn on cindent, and if I create a .asm file, it will turn on regular autoindent and set ft=nasm so Vim uses NASM syntax highlighting. How do I go about doing this?
Text in firefox (mainly) as in other applications in my system look as you can see above. I didn't touch anything in the configuration. It's started from the very first moment I finished installing 10.04 Has anyone had the same issue?
Im currently using OpenOffice.org Writer to write a hand in document for my course. I've come to the point where I want to create a graphical tree in Draw to present an idea and then add this document into writer. I've tried to use Insert -> Object -> OLE Object, and add the document as an inline frame. This looked pretty ugly though, either it's too small or there seems to be no way to just resize the frame without stretching the whole document into unreadability.
I'm want to get some logs from my server, but not general logs like syslog that gives me a lot of random logs. I want to know how I can get logs of things like logins(with time, IP and username), commands that the user ran, process running at the time and things like this.
I'm setting up link aggregation. When I use two ports of the same nic everything is working fine. When I use two ports of different nics (broadcom and intel) it doesn't work. Does anyone know of limitations using two different nics for link aggregation?
This is concerning the normal login password at command line by changing via the 'passwd' command. Is there a way to change the type of passwords used? For example, the majority of linux distros use MD5. In Slackware or Centos, where would I change the security setting to go from MD5 to DES or some other encryption?
Each type has two options: 32 & 64-bit. What type of download are these, Full Distribution or Live Image?
2. Both Full Distribution and Live Image seem to allow one to install the complete Fedora system, but Live Image appear to be much smaller file. So why should one choose the Full Distribution option?
3. The 4 desktop environments that can be downloaded from the link mentioned in my question 1 above can be installed. But these are also called spins. I thought spins can only be tried out, but not installed, right?
4. Is there a way to be able to use 2 different types of desktops, for example, use KDE for majority of the time and Xfce occasinally? That is, is there a way to just download a specific desktop environment as a package (not the entire Fedora system), for example, Xfce, and then install it on your existing Fedora system (for example running KDE), and be able to switch easily between these two desktop environments? Or one has to uninstall the entire existing Fedora system and then install the other type of Fedora (in this example, uninstall Fedora KDE, then install Fedora Xfce)?
I have used it for some times but never went behind basic use to use Internet, save files, write documents with OpenOffice...
I just installed the 11.2 version in 64-bit. I previously used a 11.1 version, and on which sounds worked fine.
I do get the login and logout jingle, and CDs play fine as well.
My problem occurs when I try to watch a video on Internet, so with FlashPlayer, and also when using Skype: I get neither the notification sounds, and a test call tells me I have a problem with the audio device.
When I point my cursor on the "sound" icon on my control board, it tells me the sound is at 0% even though it works for the above-listed tasks.
Here is what my computer has (from "system configuration"), including the last two lines I get when I click the "advanced" option:
HDA VIA VT82xx (VT1708 Analog) HDA VIA VT82xx (VT1708 Digital) HDA ATI HDMI, ATI HDMI (HDMI audio output) PulseAudio HDA ATI HDMI, ATI HDMI HDA VIA VT82xx, VT1708 Digital(IEC958(S/PDIF) Digital audio output)
Everything has this same preset configuration: notifications, video, etc.
I noticed in an update i did today that a number of things from the 'distribution updates' category were marked as 'new install'. Included in them were things like alien, Postfix, and RPM. the RPM especially confuses me. Is Ubuntu moving to being able to handle both package types? As far as I can tell these were from the official updates. not some third party repository I've added.
associate html attachment in emails with Firefox and tried to edit mime type extensions in Thunderbird through Edit/Preferences/Attachments/Download Actions/View & Edit Actions but it is empty and there is no way to add extensions there. Is there a different way to do it? I tried to choose Firefox while opening the attachment. It works but does not remember it for further actions.
I've noticed this issue for a long time now, and it's always bothered me. Whenever I have to open a file within a program or upload something to a website, etc., the window that pops up is always HUGE. The reason is due to the list of file types at the bottom. Instead of cutting off with an ellipsis at some point, every single applicable file type is listed. I can't resize these windows, either, so they always take up my entire screen. Is there any way to fix this so that these kinds of windows are a more reasonable size?